<html>
<head>
<script>
function test1(){
//window.alert("Ok onload");
var t = document.getElementById('text1');
t.onfocus;
}
function test2(){
window.alert("Ok");
}
</script>
</head>
<body onload = "test1()" onbeforeunload = "test2()" onunload = "test2()">
<input id = "text1" type ="text" onfocus = "test1()"/>
</body>
</html>
onload onunload onbeforeunload使用
最新推荐文章于 2019-01-10 17:14:00 发布