為什么我的只出現(xiàn)了一個框,用alert調(diào)試的時候第二個alert一直沒有,求大佬幫我看一下,蟹蟹。
<!DOCTYPE html>
<html lang="en">
<head>
? ? ? ?<meta charset="UTF-8">
? ?<meta name="viewport" content="width=device-width, initial-scale=1.0">
? ?<meta http-equiv="X-UA-Compatible" content="ie=edge">
? ?<title>Document</title>
</head>
<script type="text/javascript"> ?
? ?function openWindow(){
? ? ? ?var a=confirm("是否打開新窗口?");
? ? ? ?alert("bbb")
? ? ? ?if(a==ture){
? ? ? ? ? alert("aaa");
? ? ? ? ? var www=prompt("請輸入網(wǎng)址:","http://idcbgp.cn");
? ? ? ? ? if(www==null){
? ? ? ? ? ?document.write("拜拜!");
? ? ? ? ? }
? ? ? ? ? else{
? ? ? ? ? ? ?window.open(www,"_blank","width=400,height=500,menubar=no,toolbar=no");
? ? ? ? ? }
? ? ? ? ?
? ? ? ?}
? ? ? ?else{
? ? ? ? ? ?document.write("拜拜!");
? ? ? ?}
? ? ? ?
? ?}
2019-03-23
if(a==ture){??
這里面的ture拼錯了? ?應(yīng)該是true