Home  >  Q&A  >  body text

var today=new Date();这段语句怎么理解,求指导?

today是固定的吗?就是已经编好,使用这个作为对象名,就会以当前电脑时间为初始值?

汪汪汪汪2863 days ago1879

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 22:50:03

    var today=new Date(); How do you understand this statement? Can you please give me some guidance? -PHP Chinese website Q&A-var today=new Date(); How to understand this statement? Can I ask for guidance? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 阿神

    阿神2016-12-17 16:39:45

    var today=new Date();

    意思是:new Date()创建你电脑的时间初始化 赋给 today对象, 那么这个对象就可以干很多事了! 他就是Date的代言人! 如下图 :

    56d6726b0001b7d704790981.jpg.png


    reply
    0
  • Cancelreply