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