下面这段代码应该怎么改才是正确的?
if len(request("nr"))>125 then
response.Write("<script language=javascript>alert('内容太多了!');history.go(-1); </script>")
response.End()
end if
我用上面的代码判断时,怎么数字不对,我上面写的是125,但是确是大于118个汉字时就提示内容太多了
...全文
14124打赏收藏
len(request("nr"))>125 问题
下面这段代码应该怎么改才是正确的? if len(request("nr"))>125 then response.Write("alert('内容太多了!');history.go(-1); ") response.End() end if 我用上面的代码判断时,怎么数字不对,我上面写的是125,但是确是大于118个汉字时就提示内容太多了
response.write "<br>nr="&len(request("nr"))'到底有多长?
if len(request("nr"))>125 then
response.Write("<script language=javascript>alert('内容太多了!');history.go(-1); </script>")
response.End()
end if
if int(len(request("nr")))>125 then
response.Write("<script language=javascript>alert('内容太多了!');history.go(-1); </script>")
response.End()
end if
//这样理论上就应该没问题了,你可以试试