沒反應的頁面
<!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?kuang=comfirm("是否打開對話框?");
????????if(kuang==true)
????????{
????????????//?通過輸入對話框,確定打開的網址,默認為?http://www.xianlaiwan.cn/
????????????var?netsite;
????????????netsite=prompt("請輸入要打開的網址:","http://www.xianlaiwan.cn");
????????????var?mywin=window.open(netsite,'_blank''width=400,height=500,menubar=no,toolbar=no');
????????????//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
????????}
????}
????????
????
??</script>?
?</head>?
?<body>?
??<input?type="button"?value="新窗口打開網站"?onclick="openWindow()"?/>?
?</body>
</html>好像弄不了,大神們能幫忙看看嗎
2019-09-29
confirm? 這個你打錯了? ?window.open中的'_blank'和'width~~~'中間缺個逗號
2019-10-11
少一個mywin.open();你只定義了mywin