HTML Display Current date

前端 未结 6 1317
日久生厌
日久生厌 2021-02-02 13:19

I am using website builder called \'clickfunnels\', and they don\'t support feature that would allow me to display current date. But, I can add custom html to it.

I was

6条回答
  •  深忆病人
    2021-02-02 13:39

    Use Date::toLocaleDateString.

    new Date().toLocaleDateString()
    = "9/13/2015"
    

    You don't need to set innerHTML, just by writing

    will work.

    P.S.

    new Date().toDateString()
    = "Sun Sep 13 2015"
    

提交回复
热议问题