'jQuery' is undefined in IE only

2019-07-16 09:10发布

问题:

I have a html file which works perfectly in all the browsers other than IE. In IE I am getting an error

   SCRIPT5009: 'jQuery' is undefined

But this issue can be fixed by opening this file say index.html in any eitor and save it in different name. But if I save this file as index.html itself, issue will not be fixed.

Can any one let me know what is this issue?!!

回答1:

  1. If you have used application/javascript, change to text/javascript

  2. Check the path of jquery is your jquery in lib/js/, or just lib/?

  3. Make sure your lib directory is relative to the calling page You may have meant /lib/jquery.js (the slash in the beginning makes a difference).

May this will help.There is a link from Jquery forum.