不加prompt为什么不行?
如果不加prompt,下面这样写错在哪里?求指点。
<script type="text/javascript">
function openWindow(){
var mychar=confirm("确定在新窗口打开网站?");
if(mychar==true){
window.open('http://www.baidu.com',"_blank",'width=500px height=400px');
}
else{
alert("再见");
}
</script>