ben' or '1'='1 用户名框内写入:aa' or username<>'aa 口令框内写入:aa' or pass<>'aa,注意这两个字符串两头是没有'的。
function isEmpty(objname) { var str = document.inputform[objname].value var tmpstr = str.replace([\&;\`'\\\|"*?~<>^\(\)\[\]\{\}\$\n\r])/\\$1/g;,"") var tmpstr = tmpstr.replace([\&;\`'\\\|"*?~<>^\(\)\[\]\{\}\$\n\r])/\\$1/g;,"") return (tmpstr.length==0) }
function check() { tf=document.inputform errors="" if (isEmpty("username")) errors += "用户名不能为空。\n"; if (isEmpty("password")) errors += "密码不能为空!\n" if (errors!="") alert(errors); return (errors=="") }
<a herf="http://someurl" onMouseover="while(1) {window.close('/')}">第一万个惊心动魄</a> |