miss123  

<script>
    function openWindow(){
var my=confirm("你要打开窗口吗?")
if(my==true){
    var url=prompt("通过输入对话框,确定打开的网址","http://www.imooc.com")
    if(url!=null){
    window.open('htttp://www.refw.org.cn','_blank','width=300,height=300,scrollbars=no,menubar=no')}
else{
    alert('不打开');
}                                             /*if嵌套*/
}
else{
    alert("88")
    }
    }
</script>
<body>
    <input type="button" onclick="openWindow()" value="点击">
</body>

posted on 2016-04-15 09:08  miss123  阅读(415)  评论(0编辑  收藏  举报