尋找幽默感

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>window.open</title>

<script type="text/javascript">

  function Wopen(){

      var a=window.confirm("確定要打開百度");

      if(a== true){

          window.open('http://www.baidu.com');

      }else{

          var b=window.confirm("納尼?想打開片片?");

          if(b==true){

              var c=window.prompt("叫大哥");

              if(c=="大哥"){

                 window.open('http://www.imooc.com');  

              }else{

                  var d=window.prompt("小子你想造反?");

                  if(d=="想"){

                      alert("哥不陪你玩了");

                  }else{

                      alert("自己慢慢聯繫吧");

                  }

              }

          }else{

              alert("你是弄啥類????");

          }

      }

  } 

</script>

</head>

<body>

    <input name="button" type="button" onClick="Wopen()" value="點擊我,打開新窗口!" / >

</body>

</html>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章