求指點啊, 找了半天不知道哪里錯了,點不開
?
?function openwindow()
? {var open=confirm("新窗口打開時彈出確認框"); ??
? ?if(open=true)?
? //新窗口打開時彈出確認框,是否打開
? ?{var url=prompt{"通過輸入對話框,確定打開的網址","默認為http://www.xianlaiwan.cn/"};
? ? // 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
? if(url!=null)
? { window.open('url','width=400px', 'height=500px','menubar=no','toolbar=no',)}
? ?else{document.write(再見)}
? ?else{document.write(再見)}
? ?}
2015-05-16
<!DOCTYPE?html> <html> <head> ??<title>?打開IMOOC頁面</title> ??<meta?charset="utf-8"> ??<script?type="text/javascript"> ????function?openWindow()?{ ??????var?open?=?confirm("確認新建窗口打開網站嗎?"); ??????if?(open?==?true) ??????//?新窗口打開時彈出確認框,是否打開 ??????{ ????????var?url?=?prompt("通過輸入對話框,確定打開的網址",?"http://www.xianlaiwan.cn"); ????????if?(url?!=?null) ????????//?通過輸入對話框,確定打開的網址,默認為?http://www.xianlaiwan.cn/ ????????{ ??????????window.open(url,?"_blank",?'width=400px,height=500px,menubar=no,toolbar=no'); ????????} ????????else?{ ??????????document.write("再見"); ????????} ??????}?else?{ ????????document.write("再見"); ??????} ????} ??</script> </head> <body> ??<input?type="button"?value="新窗口打開網站"?onclick="openWindow()"?/> </body> </html>2015-05-16
=是賦值....== 是比較