function alertdiv() { alertWin('邮件高级查找',350,250,msg2) } function jqshow() { doSomething(); $('#mailMenu').show(800) } function closew() { // setTimeout(hid,10000) } function hid() {$('#mailMenu').hide(800)} document.οnclick=function() { hid() } function doSomething(){ var e = getEvent(); if (window.event) { e.cancelBubble = true; } else { // e.preventDefault(); e.stopPropagation(); } } function getEvent() // 获取Event对象,同时兼容ie和ff的写法 { if (document.all) return window.event; var func = getEvent.caller; while (func != null) { var arg0 = func.arguments[0]; if (arg0) { if ((arg0.constructor == Event || arg0.constructor == MouseEvent) || (typeof(arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) { return arg0; } } func = func.caller; } return null; } <div style="position:relative;z-index: 14; width:20px; top: -19px; left: 260px; height: 14px; cursor:pointer" οnclick="jqshow()"><input type="button" style="border:0px;BACKGROUND-COLOR: transparent; width:100%;" οnblur="hid()" value="▼"> </div>