<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script>
window.onload = function(){
document.getElementById("btn").onclick = function(){
location.href="惊喜.html"
}
}
</script>
</head>
<body>
<input type="button" value="点我有惊喜!" id="btn" />
</body>
</html>
JavaScript的加载网页的onload事件
猜你喜欢
转载自blog.csdn.net/weixin_39232706/article/details/88749517
今日推荐
周排行