Home  >  Article  >  Web Front-end  >  I was tortured half to death by jQuery, revealing why jQuery cannot be used in IE/Firefox_javascript skills

I was tortured half to death by jQuery, revealing why jQuery cannot be used in IE/Firefox_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:36:10878browse

The project he used was developed with Asp.Net technology and still used Webform as the front-end processing, but some functions included jQuery functions. The problem he encountered was that no matter whether he used IE or Firefox, the part of the page that included jQuery did not function properly. use.


After searching Google, the results can be summarized into 3 types:

FSO function is not enabled
IE security setting level is too high
MSXML is not installed
But for Now after checking the project, none of the above is the problem. There is a test page in the project to check whether the server can run jQuery normally. The content is the same as the jQuery official website:

Code

Copy code The code is as follows:



< script type="text/javascript" src="js/jquery.js" />



Link



But no matter what, I couldn’t see the "OK" prompt pop-up by jQuery in IE or Firefox. I was embarrassed... So I performed the following steps:

Download the latest jQuery script and replace it. The version included in the project
Check each line of javascript code
Check the IE security settings and set it to the lowest
…………
There is no effect, and it was not until today that I suddenly discovered that the page called The jQuery reference line is written like this



"OK" finally pops up...

But there is a problem It’s not over yet. The project developer has included jQuery in the master page. The source code is as follows

Code
Copy code The code is as follows:







Check the ASP.NET official forum to see the answer http:/ /forums.asp.net/t/1377657.aspx, after I added EnablePartialRendering="true" and EnableScriptGlobalization="false" to the Script control properties, everything was normal. At this point, all the problems were solved and the project was successfully deployed.
Summary: Thank you for taking the time to read my article, but I checked the W3C specification for referencing