<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title>div 触发失去焦点事件</title>
</head>
<body>
<h1>设置tabindex属性可触发焦点事件</h1>
<div style="float:left;">
<div id="birthday__jQSelect0" class="dropdown" tabindex="0">
<li>测试一下 </li><li>测试一下 </li><li>测试一下 </li>
</div>
<script type="text/javascript">
document.getElementById('birthday__jQSelect0').onmouseover = function(){
document.getElementById('birthday__jQSelect0').focus();
return false;
}
document.getElementById('birthday__jQSelect0').onblur = function(){
alert("jjjjjj");
return false;
}
</script>
<iframe height="100" src="aa.html">
</iframe>
</body>
</html>
div 触发失去焦点事件
最新推荐文章于 2024-08-04 18:23:42 发布