求解。。。。。。為什么點(diǎn)取消后打開(kāi)的不是百度?
<!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ì)話框,確定打開(kāi)的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? //打開(kāi)的窗口要求,寬400像素,高500像素,無(wú)菜單欄、無(wú)工具欄。
? ? function openWindow(){
? ? ? ? var str="確認(rèn)打開(kāi)新網(wǎng)頁(yè)嗎?"
? ? ? ? var bb=confirm(str);
? ? ? ? if(bb=true){window.open('http://imooc.com','blank','height=500,width=400,menubar=no,toolbar=no');
? ? ? ? }else{window.open('htttp://www.baidu.com');
? ? }
? ??
2018-06-10
==true