61,110
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>未使用var x,有效</title>
</head>
<body>
<input type="button" value="点击" onclick="popup()">
<script type="text/javascript">
function popup(){
x=window.open("default.html","aha","scrollbars=yes,width=400,height=200");
setTimeout("x.location.hash='fourth'", 2000);
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>未使用var x,有效</title>
</head>
<body>
<input type="button" value="点击" onclick="popup()">
<script type="text/javascript">
function popup(){
var x=window.open("default.html","aha","scrollbars=yes,width=400,height=200");
setTimeout("x.location.hash='fourth'", 2000);
}
</script>
</body>
</html>