IE事件处理程序没效果,提示“Object doesn't support property or method 'attachEvent'”
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>无标题文档</title> <style> .ee{text-decoration:line-through; text-decoration:underline; } </style> </head> <body> <input type="button" id="btn3" value="按下去3"> <script type="text/javascript"> function ee(){ alert("Hello Haa!"); } var btn3 = document.getElementById("btn3"); btn3.attachEvent('onclick',ee); </script> </body> </html>