沒有彈出新窗口
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對象</title>
<script type="text/javascript">
function op(){
? ? var a = confirm("歡迎━(*`?′*)ノ來到慕課網(wǎng),點擊【確定】一起嗨!");
? ? if(a == true){
? ? ? ? window.open('http://idcbgp.cn','_blank','width=600px,height=400px');
? ? }
? ? else{
? ? ? ? return;
? ? }
}
</script>
</head>
<body>
<form>
<input type="button" value="點擊我,打開新窗口" onclick="op()"/>
</form>
</body>
</html>
2019-12-10
把你代碼復制下來的,我都可以打開,你應該是瀏覽器問題。
2019-12-08
換個瀏覽器試試?