求解。。。。。。為什么點取消后打開的不是百度?
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
? ??
? ? // 新窗口打開時彈出確認框,是否打開
? ? // 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? function openWindow(){
? ? ? ? var str="確認打開新網頁嗎?"
? ? ? ? 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