為什么沒有彈出網頁?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對象</title>
<script type="text/javascript">
confirm("歡迎來到慕課網");
function open1()
{
? ? window.open('http://www.xianlaiwan.cn','width=600,height=400');
}
</script>
</head>
<body>
<form>
<input type="button" value="點擊我,打開新窗口" onclick="open1()" />
</form>
</body>
</html>
2017-01-10
代碼沒問題 是不是你的瀏覽器問題?
2017-01-10
你的代碼我測試過了,沒問題啊
2017-01-10
我執行了是對的嘛,要點擊按鈕