为什么调用输入框的内容无法打开网址?
function openWindow(){
var click=confirm("open a new window?");
if(click==true)
{
var url=prompt("write down the url please","http://www.imooc.com/");
if(url!=null)
{
window.open('url','_blank','width:400px','height:500px','menubar=no','toolbar=no','scrollbars=yes');
}
else
{
alert("have fun!");
}
}
else
{
alert("byebye!");
}
}