請問為什么不執(zhí)行函數(shù) ? Edge瀏覽器會顯示函數(shù)未定義。我只是在IF語句里加了一個Window.open()函數(shù)就顯示未定義了
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="ContentType : content="text/html"charset="uft-8">
<script type="text/javascript">
function wata(){
var checkYn;
checkYn=confirm("你想跳轉(zhuǎn)新地址嗎");
if(checkYn==true)
{
window.open("http//:www.baidu.com" "_blank" left=50)
}
else{
document.write("好吧");
}
}
</script>
</head>
<body>
<input type="button" name="button" onClick="wata()"value="請點擊" />
</body>
</html>
2018-03-10
你的Window.open()函數(shù)本來就沒有定義啊, 函數(shù)要用function定義