<!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)打開新網(wǎng)頁?");??????
if(open==true)??????
{????????var?wz=prompt("在下方輸入網(wǎng)址,并確認(rèn)!","http://idcbgp.cn")????????
if(wz!=null)??????
{??????????window.open(wz,'_blank','width=400px,hight=500px,menubar=no,toolbar=no')
????????????????else?????????
???????????????document.write("Byebye!")??????
??????????????}??????
??????????????else??????
??????????????document.write("hello")??????
??????????????}??
??????????????}?
???????????????</script>??
???????????????</head>??
???????????????<body>? ??
???????????????<input?type="button"?value="打開網(wǎng)站"?onclick="openWindow()"?/>??</body></html>
2018-10-07
2018-10-05
</script>的上面兩個大括號中間加一個openwindow();