div 触发失去焦点事件

来源:互联网 发布:python黑帽子视频教程 编辑:程序博客网 时间:2024/04/28 17:09
<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>


原创粉丝点击