永发信息网

asp 查询功能,response.write出数据库内的值后如何转换成中文显示

答案:2  悬赏:10  手机版
解决时间 2021-01-25 03:18
页面显示:response.write "<td align='center' width='10%' height='27' >"& crn_type &" </td>"
response.write "<td align='center' width='10%' height='27' >"& crn &" </td>"
response.write "<td align='center' width='10%' height='27' >"& p_activity &" </td>"
response.write "<td align='center' width='10%' height='27' >"& p_lst_tx_date &" </td>"
response.write "<td align='center' width='20%' height='27' >"& p_activity &" </td>"
response.write "<td align='center' width='20%' height='27' >"& activity &" </td>"
response.write "<td align='center' width='20%' height='27' >"& lst_tx_date &" </td>"
response.write "<td align='center' width='10%' height='27' >"& remark &" </td>"
其中p_activity 的值是Y,N,D
我想这样显示,如果p_activity 值是Y,网页查询出的结果不显示Y而显示“上报出勤”之类的中文意思。怎样改?
<tr align='center' valign='middle' onMouseOver="this.bgColor='#FFF1B1'" onMouseOut="this.bgColor='#B8E9D6'" bgcolor=#B8E9D6 >
<%
if crn_type="TL" then
crn_type_zw="机"
else if crn_type="SL" then
crn_type_zw="吊"
else if crn_type="PR" then
crn_type_zw="岸"
else if crn_type="TR" then
crn_type_zw="门"
else if crn_type="TK" then
crn_type_zw="车"
end if
response.write "<td align='center' width='10%' height='27' >"& crn_type_zw &" </td>"

response.write "<td align='center' width='10%' height='27' >"& crn &" </td>"
response.write "<td align='center' width='10%' height='27' >"& p_activity &" </td>"
response.write "<td align='center' width='10%' height='27' >"& p_lst_tx_date &" </td>"

页面报错,显示不了
最佳答案
作个判断就行

<%
if p_activity = "Y" then
p_activity_wz = "上报出勤"

else
p_activity_wz = "未出勤"

end if

%>>
response.write "<td align='center' width='10%' height='27' >"& p_activity_wz &" </td>"
全部回答
楼上正解 <% if p_activity = "Y" then p_activity_wz = "上报出勤" else if p_activity = "N" then ........ else ........ end if %>> response.write "<td align='center' width='10%' height='27' >"& p_activity_wz &" </td>"
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
若妆美容院(兴安分店)地址在什么地方,想过去
星际争霸中怎样取消选中的人物?
【黄岐山】登黄岐山作文
单选题函数y=x2+3x-5(x≥0)的值域是A.(-∞,
问下有什么科幻的arpg游戏大作么?
我和女朋友,在QQ聊天时一点都不尴尬,但一打
电脑开机一下有电一下又没有了,是怎么回事啊
下雪天撒盐是为了提高熔点吗
大野兔多肉土和美乐棵多肉土哪个好
读某城市布局规划图,完成下列问题在图中A、B
高数中用来证明不等式的方法都有哪些?
怎么从银行账号上知道自己银行卡是那个地方发
老师傅地址在哪,我要去那里办事
你好,请问武穴到九江火车站最的一班车是几点
【二战飞行员】为啥飞行员会看见二战时的飞机
推荐资讯
这个是什么植物?拌沙拉里面经常有。
菊花 干柠檬 玫瑰花还有金银花能一起泡水喝吗
三星s5怎样获取root权限
微波炉电源灯亮,托盘也转但食物加不热怎么回
BD为△ABC的角平分线,CD为△ABC的外交∠ACE的
酷狗怎样上传歌曲
洲际网咖地址在哪,我要去那里办事
求一个高端大气简单的名字 女儿姓段 阳历 2月
东宝区荆门中国联通(智慧沃家体验店)在什么地
太阳能热水器保修期一般是多长
苹果平板电脑可以写文章吗
看图猜成语有四张图,有人,月亮,太阳,井盖
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?