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