Uncaught TypeError: undefined is not a function on loading jquery-min.js

前端 未结 13 738
北荒
北荒 2020-11-28 22:55

I\'m building a normal webpage which requires me to load about five CSS files and ten Javascript files.

  • When loading them separately in the HTML page, my webpa
相关标签:
13条回答
  • 2020-11-28 23:51

    Remember: Javascript functions are CASE SENSITIVE.

    I had a case where I'm pretty sure that my code would run smoothly. But still, got an error and I checked the Javascript console of Google Chrome to check what it is.

    My error line is

    opt.SetAttribute("value",values[a]);
    

    And got the same error message:

    Uncaught TypeError: undefined is not a function
    

    Nothing seems wrong with the code above but it was not running. I troubleshoot for almost an hour and then compared it with my other running code. My error is that it was set to SetAttribute, which should be setAttribute.

    0 讨论(0)
提交回复
热议问题