TypeError: Date is not a constructor

前端 未结 4 881
逝去的感伤
逝去的感伤 2021-01-17 16:05

So, I\'ve been making forms for my company for some time now with pretty easy Javascript that has worked for me in the past. However all of a sudden it\'s kicking out the er

4条回答
  •  天涯浪人
    2021-01-17 16:39

    You can't define a variable called "Date" because there's a built-in object in JS called that (you're using it in your code, actually). Change the name to something else.

    var Date= somthing; <-- wrong declare, you should not use build -in object name

提交回复
热议问题