'-------------------------
function check_err(str)
dim i,mid_str,ParaValue
ParaValue=" ,.:;<>&%'="""
check_err=false
for i=1 to 12
mid_str=mid(ParaValue,i,1)
if instr(str,mid_str) then
check_err=true
exit for
end if
next
end function
'------------------------
If not isNumeric(p_id) then
response.write "<script>alert(""错误操作!"");window.history.back();</script>"
response.end
End if
if check_err(p_id) then
response.write "<script>alert(""错误操作!"");window.history.back();</script>"
response.end
end if
如果我这样写,有什么不好之处呢?
function check_err(str)
dim i,mid_str,ParaValue
ParaValue=" ,.:;<>&%'="""
check_err=false
for i=1 to 12
mid_str=mid(ParaValue,i,1)
if instr(str,mid_str) then
check_err=true
exit for
end if
next
end function
'------------------------
If not isNumeric(p_id) then
response.write "<script>alert(""错误操作!"");window.history.back();</script>"
response.end
End if
if check_err(p_id) then
response.write "<script>alert(""错误操作!"");window.history.back();</script>"
response.end
end if
如果我这样写,有什么不好之处呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货