问答详情
源自:5-6 编程练习

仅供参考,有更好的一起学习

一起学习

提问者:thekingpeople 2014-11-07 20:13

个回答

  • qq_学不会_2
    2015-12-16 16:05:32

    <script type="text/javascript">


     

      var mydate=new Date();

      var myyear=mydate.getFullYear();

      document.write(myyear+"年");

      

      var mymonth=mydate.getMonth();

      document.write(mymonth+"月");

     

       var myday=mydate.getDay();

       document.write(myday+"日");

      

       var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];

       var mynum=mydate.getDay();

       document.write(weekday[mynum]);

      

      

     

     var myarr=[87,81,97,76,74,94,90,76,64,76]

    var sum=0;

    for(i=0;i<10;i++){

        myarr[i]=[87,81,97,76,74,94,90,76,64,76]

        sum +=parseInt(myarr[i].slice())


        }

    document.write("班级总分为:"+sum)