ASP用response.write动态输出这行代码老是出错 能帮我改一下吗?

来源:百度知道 编辑:UC知道 时间:2024/06/13 17:25:21
response.write "<div id='homeStatistics' style='position:absolute; left:50px; top:100px; width:<" & "% = rs_callerRecord('log_homeTotal') %" & "> px; height:15px; z-index:1; background-color:#7A69B0;'></div><div id='homeRunoff' style='position:absolute; left:<" & "% = rs_callerRecord('log_homeTotal') + 64 %" & "> px; top:100px; width:176px; height:15px; z-index:11;'><table width='175' border='1' align='center'><tr align='center' valign='middle'><th height='14' nowrap='nowrap' bordercolor='#99CCCC'><span class='homeTitle'>活动起始页访问总数:<" & "% = rs_callerRecord('log_homeTotal') %" & "></span></th></tr></table></div>"

我没详细的看,但我知道你是 response.write "%>"出现错误了, 因为%>提前关闭了前面的<% , 造成段代码结束,你可以这样写,先将这段字符串赋值给变量a ,a="<div…… $a>" , (用$a来代替%) 然后 a=replace(d,"$a","%") , response.write a ,这样写就OK了,还不明白的加俺QQ QQ 290762903My Web : http://www.lovingkiss.cn

response.write "<div id='homeStatistics' style='position:absolute; left:50px; top:100px; width:" & rs_callerRecord('log_homeTotal') & "> px; height:15px; z-index:1; background-color:#7A69B0;'></div><div id='homeRunoff' style='position:absolute; left:" & rs_callerRecord('log_homeTotal') + 64 & "> px; top:100px; width:176px; height:15px; z-index:11;'><table width='175' border='1' align='center'><tr align='center' valign='middle'><th height='14' nowrap=