判断非符合条件下警告,
if id <> rs(0) then
response.write "<script language='javascript'>" & chr(13)
response.write "alert('ID非法操作!');" & Chr(13)
response.write "window.document.location.href='javascript:history.go(-1)';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
问题是:当前我的条件是符合的,却弹出警告!
我把它改成:
if id = rs(0) then
response.write "<script language='javascript'>" & chr(13)
response.write "alert('ID非法操作!');" & Chr(13)
response.write "window.document.location.href='javascript:history.go(-1)';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
却正常