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

难度也一般

难度也一般

提问者:M_smile 2015-03-29 00:42

个回答

  • yahoo16
    2015-12-15 10:31:40

     function openWindow()
        {
            var open=confirm("确定打开窗口吗?") ;
            if(open==true)
                {
                    var url=prompt("确认打开的网址","http://www.imooc.com");
                    if (url!=null)
                        {
                            window.open(url,"_blank","width=400px,height=500px,menubar=no,toolbar=no")
                        }
                    else
                    {
                        alert("已取消")
                    }
                }
            else
                {
                    alert("已取消");
                }
       
        }