大佬們幫我看看為什么我這個窗口打不開~
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title>??
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?
? <script type="text/javascript">??
? ? function openWindow(){
? ? ? ? var open = confirm("打開新窗口");
? ? ? ? if(open == true){
? ? ? ? ? ? var url = prompt("請輸入要打開的網(wǎng)站網(wǎng)址","http://idcbgp.cn");
? ? ? ? ? ? if(url!=null){
? ? ? ? ? ? ? ? widow.open(url,'_blank','width = 400px,height = 500px,menubar = null,toolbar = null');
}
? ? ? ? else{
? ? ? ? ? ? alert("你選擇了取消");
? ? ? ? }
? ? }?
</script>?
?</head>?
?<body>?
? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2018-12-19
function函數(shù)最后面少了一個大括號,window.open()打錯了