首页 > 代码库 > window常见事件

window常见事件

<script type="text/javascript">
/*onunload = function(){
alert("onunload run");
}

onload = function(){
alert("onload run");
}

onbeforeunload = function(){
alert("onbeforeunload run");
}*/

//关闭窗口前弹窗
onunload =function(){
open("http://www.baidu.com","_blank","height=200,width=400,status=yes,toolbar=yes,menubar=yes,location=yes");
}
</script>