Javascript object is not a function

后端 未结 2 987
终归单人心
终归单人心 2020-12-21 23:40

I get the following error and I can\'t find why:

TypeError: object is not a function

Here is my html:

         


        
2条回答
  •  一整个雨季
    2020-12-22 00:14

    Your code is working fine for me. See demo here

    So make sure of the following

    1. Make sure that you are including the script before calling the function.
    2. Also, it is not a good idea to keep the ids/names and function names same

      
      

      // Change the idand name here

提交回复
热议问题