当前位置: 代码迷 >> Java Web开发 >> 以下代码为何无效?解决方法
  详细解决方案

以下代码为何无效?解决方法

热度:39   发布时间:2016-04-17 12:50:40.0
以下代码为何无效?
<html>
<head> <title> DOM实例 </title> </head>
<body>
<script   language= "javascript ">
<!--
var   whatsNew=open( ", '_blank ', 'top=50,left=50,width=200,height=300,menubar=no,toolbar=no,directories=no,location=no,status=no,resizable=no,scrollbars=yes ');
whatsNew.document.write( ' <center> <b> 更新通知 </b> </center> ');
whatsNew.document.write( ' <p> 最后更新日期:00.08.01 ');
whatsNew.document.write( ' <p> 00.08.01:增加了 "我的最爱 "栏目. ');
whatsNew.document.write( ' <p   align= "right "> <a   href= "javascript:self.close() "> 关闭窗口 </a> ');
whatsNew.document.close();
//-->
</script>
</body> </html>

------解决方案--------------------
var whatsNew=open( ' ', '_blank ', 'top=50,left=50,width=200,height=300,menubar=no,toolbar=no,directories=no,location=no,status=no,resizable=no,scrollbars=yes ');

这句的问题。请看open()中的第一个参数。是两个单引号不是一个冒号……
  相关解决方案