month=taoday.getMonth();
-----------------------------
taoday未定...你写错字鸟...

解决方案 »

  1.   

    <script language="JavaScript">
      <!--
       var today = new Date();
       date=today.getDate();
       month=today.getMonth();
       month=month+1;
       if(month<=9) 
       month="0"+ month;
       year=today.getYear();
       document.write(year,"-",month,"-",date);
      //-->
      </script>
      

  2.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <title>login.html</title>
        
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="this is my page">
        <meta http-equiv="content-type" content="text/html; charset=gb2312">
        
        <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
        
      </head>
      
      <body>
      今天是:
      <script language="JavaScript">
      <!--
       var today = new Date();
       date=today.getDate();
       month=today.getMonth();
       month=month+1;
       if(month<=9) 
       month="0"+ month;   year=today.getYear();
       document.write(year,"-",month,"-",date);
      //-->
      </script>


     <br>
      </body>
    </html>
      

  3.   

    这样多简单
    <script language='javascript'>
    var today = new Date();
    document.write(today.toLocaleDateString());
    </script>
      

  4.   

    有两处错误:
       1."month=taoday.getMonth();" 多了个"a",应该是:month=today.getMonth();
       2.如果条件语句不写大括号的时候,要写成一行,或者缩进才能正确执行:
        if(month<=9) 
       month="0"+ month;    或者
        if(month<=9) month="0"+ month;
      

  5.   

    有没有什么好点的JAVASCRIPT开发工具
    可以查错的哦~~
      

  6.   

    month=taoday.getMonth(); //这句错了
    应该是month = today.getMonth(); 
    javascript当发现错误时,就不会执行其后的语句了
      

  7.   

    /**变量定义错了,today**/今天是:
    <script>
    var today = new Date();var date = today.getDate();
    var month = today.getMonth();month=month+1;
    if(parseInt(month)<=9)
    month="0"+ month;
    year = today.getYear();
    document.write(year,"-",month,"-",date);
    </script>
    <br/>
    </FORM>
    </BODY>
    </HTML>