为什么在编代码的时候不能用回车键啊。用了就报错。比如<%if()then() end if%>这样了在end if前面打了个回车就出错了怎么回事啊
<%if()then()
end if%>
还有 <%if ( (rs("t_expire")<date()) and (rs("t_commend")=0) ) then response.write ("a") elseif ((rs("t_expire")>=date()) and( rs("t_commend")=0)) then response.write ("b") elseif (rs("t_commend")=1) then response.write ("c") end if %>这段代码写错了吗 去掉两个elseif没错加上就一直出错,老说语句未结束。结束了啊。求哪位大哥帮帮忙,小弟拜谢!!
回复:<%if()then() end if%>
是不是后面不能用括号。。而是直接写语句就OK。。
if then 写在一行的时候不加end if,写多行的时候才要加end if
If xx Then xx
或者
if xx then
xxx
end if
同理,if else 也是一样,写在一行就不用加end if,写多行必须
if xx then xx else xx
if xx then
xx
else
xx
end if