jvavscript弹出窗口的代码可以用RESPONSE。WRITE输出吗?
再请教一下,这个语句有什么问题,打不开窗口
response.write " <td> <a href=javascript:job(select.asp?t_s_id= "&rs( "t_s_id ")& ")> <img src= "&rs( "t_s_photo ")& "> </a> </td> "
函数和SELECT.ASP文件均没有问题的,
<TD width= "37 " align= "center "> <a href= "javascript:job("SELECT.ASP?T_S_ID= <%=rs( "T_S_ID ")%> ") "> <IMG SRC= " <%=rs( "T_S_PHOTO ")%> " </a> </td>
这样写也是对的.可以用.
但我想用RESPONSE.WRITE来输出,不知该怎么写才对.
------解决方案--------------------response.write " <td> <a href= " "javascript:job(select.asp?t_s_id= "&rs( "t_s_id ")& "); " "> <img src= "&rs( "t_s_photo ")& "> </a> </td> "
试试
------解决方案--------------------response.write " <td> <a href= " "javascript:job( 'select.asp?t_s_id= "&rs( "t_s_id ")& " '); " "> <img src= "&rs( "t_s_photo ")& "> </a> </td> "
------解决方案--------------------应该是:
response.write " <td> <a href=javascript:job( 'select.asp?t_s_id= " & rs( "t_s_id ") & " ')> <img src= " & rs( "t_s_photo ") & "> </a> </td> "
job的参数要加引号的,用“ '”或者“ " "”。你没加,结果“job(select.asp...”里面的“select.asp...”就成了变量名了,当然出错了。
一个方法:浏览器打开asp页面后,再查看生成htm代码,然后再分析错误所在。
一个建议:&前后用空格,可以看得更清晰。