我是新手,请教高手javascript调试时怎么不提示错误??下面代码是我在书上抄的,浏览器既不提示错误也不显示结果,不知道为什么?
document.write("<br>今天日期位;",today.getMonth()+1+"/",today.getDate(),"/",today.getYear()+"<br>");
------解决方案--------------------
根本就错了~~~
- JScript code
document.write("<br />今天日期为"+(today.getMonth()+1)+"/"+today.getDate()+"/"+today.getYear()+"<br />");
------解决方案--------------------
- HTML code
<script> var today=new Date(); document.write("<br />今天日期为"+(today.getMonth()+1)+"/"+today.getDate()+"/"+today.getYear()+"<br />"); </script>
------解决方案--------------------
var today=new Date();
document.write(" <br> 今天日期位;",today.getMonth()+1+"/",today.getDate(),"/",today.getYear()+" <br> ");
------解决方案--------------------
<script>
var today=new Date();
document.write("<br />今天日期为"+(today.getMonth()+1)+"/"+today.getDate()+"/"+today.getYear()+"<br />");
</script>
你可以看浏览器的左下角,如果有个感叹号的话你双击就能看见错误信息了.