function openWindow(){
var str=confirm("是否打开新窗口?");
if(str==true){
var url=prompt("请输入跳转地址","http://www.immoc.com");
if(url){
window.open(url,'width=400,height=500,menubar=no,tollba=no')
}
}
}
var str=confirm("是否打开新窗口?");
if(str==true){
var url=prompt("请输入跳转地址","http://www.immoc.com");
if(url){
window.open(url,'width=400,height=500,menubar=no,tollba=no')
}
}
}
if(confirm("是否打开"))
{ var i=prompt("请输入","http://imooc.com/");
window.open("http://imooc.com/","_block","width=200","height=100");}
function con()
{
i.close();
}
</script>
</head>
<body>
<input type="button" value="关闭" onclick="con()"/>
{ var i=prompt("请输入","http://imooc.com/");
window.open("http://imooc.com/","_block","width=200","height=100");}
function con()
{
i.close();
}
</script>
</head>
<body>
<input type="button" value="关闭" onclick="con()"/>
<script type="text/javascript">
var mywin=window.open("http://www.imooc.com","_block","windth=200","height=150");
function closewindow()
{
mywin.close();
}
</script>
</head>
<body>
<input type="button" value="关闭" onclick="closewindow()"/>
</body>
</html>
var mywin=window.open("http://www.imooc.com","_block","windth=200","height=150");
function closewindow()
{
mywin.close();
}
</script>
</head>
<body>
<input type="button" value="关闭" onclick="closewindow()"/>
</body>
</html>
2018-11-25
最新回答 / 王keke
我觉得应该是有区别的吧。url= “”,应该说的是这个url里没有字符,地址就是一个空字符,而url=null,指得是一个对象吧。根本就不存在这个对象。 不知道对不对。
2018-11-24