為什么我點擊他不彈開啊!
<!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 dakai=confirm("要打開此網頁嗎?");
? ? ? if(dakai==true){
? ? ? ? ? var url=prompt("選擇此網頁打開"," http://www.xianlaiwan.cn/");
? ? ? ? ? if(url !=null){
? ? ? ? ? ? ?window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no')? ?;
? ? ? ? ? }
? ? ? ? ? ? else{
? ? ? ? ? ? ? ? alert("zaijian");
? ? ? ? ? ? }??
? ? ? else{
? ? ??
? ? ? alert("zaijian");
? ? ? }
? }
? </script>?
?</head>?
?<body>?
? <input type="button" value="點擊打開" onclick="openWindow()" />?
?</body>
</html>
2019-05-11
少了一個? }?