返回列表

IE/FF/Crome的事件处理顺序不一致

默认分类 2014/05/28 21:48

<script type="text/javascript">
<!--
function fun1(e) {
    g('bb').style.display='none';
}

function fun2(e) {
    alert('button click');
}
</script>
<input id="aa" type="text" onblur="fun1(event)" onfocus="g('bb').style.display='inline';" alt="aa" />
<button id="bb" onclick="fun2(event)" onmouseover="var aa=g('aa');aa.onblur_bak=aa.onblur;aa.onblur=''" onmouseout="var aa=g('aa');aa.onblur=aa.onblur_bak;" alt="bb">click here</button>