<!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?myM=confirm("是否打開(kāi)網(wǎng)址?");
??????????if(myM==true)?????
?????????????{???var?lr=prompt("通過(guò)輸入對(duì)話框,確定打開(kāi)的網(wǎng)址。","http://idcbgp.cn/");??????????????????
???????????????if(lr!=null)??
????????????????????{??window.open("lr",'width=400,height=500',"_blank");?????
?????????????????????}?????
???????????????}?
??}????
????</script>?
?????</head>??
?????<body>? ??
?????<input?type="button"?value="新窗口打開(kāi)網(wǎng)站"?onclick="openWindow()"?/>??
?????</body>
?????</html>
2019-02-28
你打開(kāi)新窗口時(shí)寫錯(cuò)了,應(yīng)該是
2019-02-28
嗯嗯,后來(lái)看到了,多謝。