问答详情
源自:2-7 编程练习

不能打开提示框

<!DOCTYPE html>
<html>
<head>
    <title> new document </title>    
    <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>     
    <script type="text/javascript">      
        function openWindow(){    // 新窗口打开时弹出确认框,是否打开        
        var myMessage=comfirm("是否打开");        
        if(myMessage == true){            
            var mywebsite = prompt("输入网址","http://www.imooc.com/");            
            if(mywebsite!=null){                
                window.open(mywebsite,'_blank','width=400,height=500,menubar=0,toolbar=0');            
            }   
        }  
      </script>  
</head>  
<body> 	 
    <input type="button" value="新窗口打开网站" onclick="openWindow()" />  
</body>
</html>


提问者:再见不见sid 2018-05-30 16:25

个回答

  • xiao
    2018-05-30 16:59:29
    已采纳

    comfirm -> confirm