<!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("是否打開新窗口")}
????//?新窗口打開時彈出確認(rèn)框,是否打開
????if(open==true)
????{var?open2=prompt('是否打開慕課','http//:idcbgp.cn/')
????//?通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為?http://idcbgp.cn/
??????if?else(open2!=null)
????//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
????{window.open(['http//:www.baidu.com/'],'_blank','width=400px,height=500,toolbar=no')}
????}
??</script>?
?</head>?
?<body>?
??<input?type="button"?value="新窗口打開網(wǎng)站"?onclick="openWindow()"?/>?
?</body>
</html>
javascript編程聯(lián)系哪里錯了啊,求大神指教。
幕布斯6906120
2015-11-08 20:25:49
