哪里錯了呢
<script type="text/javascript">?
??? function openwindow(){
???? var yaolan=confirm("是否打開網頁");
???? if (yaolan=="ture")
???? {
??????????? var liuwenlong=prompt("請輸入網址");
????????????? if(liuwenlong=="http://www.xianlaiwan.cn")
????????????? {
???????????????? window.open('http://www.xianlaiwan.cn','_block','width=400px,height=500px,');
??????????????? }
????????????? else
????????????? {
???????????????? alert("輸入網址有誤");
????????????? }
???? }
???? else{
??????? document.write("你取消了打開網頁");
???? }??
??? }
???
???
? </script>
?</head>
?<body>
?? <input type="button" value="新窗口打開網站" onclick="openWindow()" />
?</body>
2017-01-11
onclick="openWindow()" ?
?function openwindow(){
大小寫的問題吧
2017-01-11
?if (yaolan=="ture"),是true,拼錯了!