這里是什么問(wèn)題,誰(shuí)能幫我找找看呢?
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
? ??
? ? // 新窗口打開(kāi)時(shí)彈出確認(rèn)框,是否打開(kāi)
? ? // 通過(guò)輸入對(duì)話(huà)框,確定打開(kāi)的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? //打開(kāi)的窗口要求,寬400像素,高500像素,無(wú)菜單欄、無(wú)工具欄。
? ? function openWindow(){
? ? ? ? var mywins=confirm("你想要點(diǎn)開(kāi)這個(gè)網(wǎng)站鏈接嗎?");
? ? ? ? if(mywins==true)
? ? ? ? {var url=prompt("輸入你想輸入的網(wǎng)址","http://idcbgp.cn");}
? ? ? ? if(url!=null)
? ? ? ? {window.open(url,'width=400,height=500,menubar=no,toolbar=no');}
? ? ? ? else
? ? ? ? {alert('byebye!');}
? ? ? ? else
? ? ? ? {alert('byebye!');}
? ? ? ? }
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開(kāi)網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2016-01-20
中文標(biāo)點(diǎn)的問(wèn)題;
if-else嵌套的問(wèn)題;
open參數(shù)的問(wèn)題
function openWindow(){
? ?var mywins=confirm("你想要點(diǎn)開(kāi)這個(gè)網(wǎng)站鏈接嗎?");
? ?if(mywins==true) {
? ? ? ?var url=prompt("輸入你想輸入的網(wǎng)址","http://idcbgp.cn");
? ? ? ?if(url!=null) {
? ? ? ? ? ?window.open(url,'_blank','width=400,height=500,menubar=no,toolbar=no');
? ? ? ?}else {
? ? ? ? ? ?alert('byebye!');
? ? ? ?}
? ?}
? ?else{
? ? ? ?alert('byebye!');
? ?}
}