⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ie attach detach event test.htm

📁 javascript 核心技术 eval()函数的使用 DOM2 事件模型 非标准事件绑定 图片跟随鼠标 传统文档对象测试
💻 HTM
字号:
<!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" >
<head>
    <title>IE Attach/Detach Event Test</title>
    <meta http-equiv="content--type" content="text/html;charset=gb2312;" />
    <script type="text/javascript">
    <!--
       function showAuthor()
       {
          alert("Oscar wilde");
       }
       function enableEvent()
       {
         someText.attachEvent("onmouseover",showAuthor);
       }
       function disableEvent()
       {
         someText.detachEvent("onmouseover",showAuthor);
       }
    //-->
    </script>
</head>
<body onload="enableEvent();">
<h1>IE Attach /Detachg事件测试</h1>
<em id="someText">We may be in the gutter,but somde of us are looking at the stars.</em>
<form action="#" method="get">
<input type="button" value="Attach Event" onclick="enableEvent();" />

<input type="button" value="Detach Event" onclick="disableEvent();" />
</form>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -