Javascript error : Uncaught ReferenceError: require is not defined

后端 未结 2 1039
一整个雨季
一整个雨季 2021-01-14 09:34

I making a regster form in HTML, with javascript. I Have file Login.js. My browser says the following error: Uncaught ReferenceError: require is not defined.

2条回答
  •  遥遥无期
    2021-01-14 09:56

    require is a way for different compilers to put in stuff that is needed, later on, while keeping the file small. Did you copy the js file from somewhere else?

    You may need to include http://requirejs.org/

    Also, this looks incredibly insecure. Are you planning to release this site to the word? or is it just for class/experiment?

    As the one comment mentions, if this is supposed to be server-side code, it's not going to work very well on the client side.

提交回复
热议问题