ÎÒÔÚheadÖÐдÁËÏÂÃæµÃ´úÂë,Ïë½Ù³Öalertº¯Êý£¬¿ÉÊDz»ÖªµÀΪʲô£¬½«Õâ¸öhtml´ò¿ªÊ±£¬µ¯³öÁ½¸ö¿ò¶¼ÊÇÄÚÈݶ¼ÊÇab£¬ÎÒÒѾ½Ù³ÖÁËÕâ¸öº¯Êý£¬ÎªÊ²Ã´Ã»ÓÐЧÄØ£¿
ÎÒÔÚÏÂÃ涨Òå¸öbuttonÔÚonclickʼþÖÐÌí¼Ó´úÂëalert£¨¡°ab¡±£©£»ÏÔʾµÄ¾ÍÊÇÕý³£µÄ½á¹û£¬ÇëÎÊÕâÊÇÔõô»ØÊ£¿£¿
<head>
<script language="JavaScript" >
var _alert=alert;
window.alert=function(s){
if(confirm("ÊÇ·ñÒªµ¯³ö:"+s)){
_alert(s);
}
}
alert("ab");
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
¿ÉÄÜÊÇIEµÄBug°É¡£
Â¥Ö÷ÊÇÔÚIEÏÂÃæ²âÊÔµÄÂð£¿ÎÒÕâÀï»ðºü±íÏÖÕý³£¡£
ºÃÏñÊÇ£¬ÎÒµÄIEÒ²²»ºÃÓ㬻ðºü¿ÉÒÔ£¬Äõ½Õâ¸öie²»Ö§³ÖÂð£¿
Õâ¸öÊÇÓÃÀ´·´½Ù³ÖµÄ£¬ÇëÎÊÓÐʲôÎÊÌâÂð£¿ÎÒ×ÔIEºÍ»ðºü×Ü×ö²âÊÔÁË£¬¶¼²»ºÃÓÃO(¡É_¡É)O~
function unHook(proc){
var f=document.createElement("iframe");
f.style.border="0";
f.style.width="0";
f.style.height="0";
document.body.appendChild(f);
var d =f.contentWindow.document;
d.write("<script type=\"text/javascript\">window.parent.alert=alert;<\/script>");
Ôõô²ÅÄÜÅжϼüÅÌÊÇ·ñ±»°´ÏºÍËÉ¿ª¡£¡£¡£¡£¡£²»ÖªµÀÔõôÅжϡ£¡£¡£ËÄܸæËßÎÒÏÂÂ𡣡£¡£¡£Ð»Ð»
onkeydownºÍonkeyupʼþ
ÒýÓÃ
onkeydownºÍonkeyupʼþ
×Ô¶¯´¥·¢ÕâÁ½¸öʼþ
onkeydown °´ÏÂ
onkeyup ËÉ¿ª
......
²úÆ·µÄÅäÖÃÒ³Ãæ¹²ÓÃÒ»¸öÓÃJavaScriptµÄdTreeʵÏÖµÄÊ÷Ðνṹ£¬ÏÔʾµÄʱºò£¬Ê÷Ðνṹ¿¿ÔÚÒ³ÃæµÄ×î×ó±ß£¬¸úÎÒµÄÅäÖÃÒ³ÃæÖмä¸ôÁËÒ»´ó¿é£¬ÏÖÔÚÏë°ÑÊ÷ÐÎĿ¼¾ÓÖУ¬½ô¿¿ÔÚÅäÖÃÄÚÈÝÅԱߣ¬ÈçºÎ¿ØÖÆÊ÷ÐÎĿ¼µÄλÖã¬ÒÔ¼°¿É²»¿ ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml&q ......
ÎÒÏëÎÊ¡£¡£jsÖпÉÒÔͨ¹ý¸ö±éÀúËùÓÐÔªËز¢ÓÃgetelementbyID»ñÈ¡Ö¸¶¨IDµÄÔªËØ£¬ÄÇôÔõÑù²ÅÄܱéÀúËùÓÐÔªËØ´Ó¶ø»ñÈ¡ÓÐÖ¸¶¨classµÄÔªËØÄØ£¿£¿ºÃÏñûÓÐgetelementbyClassÕâ¸öº¯Êý°É£¿£¿
лл£¡
jqueryµ¹ÊÇ¿ÉÒÔµÄ
$(&quo ......