Uncaught ReferenceError: myFunction is not defined

前端 未结 4 681
长发绾君心
长发绾君心 2020-12-06 19:36

Gives an error. I have placed the code just before . Still getting the error.

4条回答
  •  暖寄归人
    2020-12-06 20:19

    You cannot place myFunction after the onclick. When the onclick is seen there is no definition for myFunction.

    Place the JavaScript in tag. Also, move the function outside of ready().

    Like this:

    
    
    
    ...
    

提交回复
热议问题