Internet Explorer calls jquery a small issue to note

Source: Internet
Author: User

Today in the front-end refactoring to find a very strange browser compatibility problem, I want to put a JS on the Web page special effects, so download the Jquery-easyui, after modifying the desired effect, ready to put into the project, found in IE browser can not run, The effect's effects are fairly normal in chrome and then put into the IE8 browser and its compatibility mode.

IE8 only shows the background of the current page, all the contents of the page is not displayed, I initially suspected that the JSP may be parsed into the HTML source code when the problem, but check it, and use the HTML page test, still the same situation. Feeling quite strange, after several twists and ends, finally found the problem lies in:

XML code

<script type= "Text/javascript" src= "/js/jquery-1.4.2.min.js"/>

<script type= "Text/javascript" src= "/js/jquery.easyui.min.js"/>

The two-line JS call does not seem to have any problems, but it is not shown, so I changed it to:

XML code

<script type= "Text/javascript" src= "Js/jquery-1.4.2.min.js" ></script>

<script type= "Text/javascript" src= "Js/jquery.easyui.min.js" ></script>

In the Internet Explorer is incredibly normal display, it is inconceivable ah. when calling the jquery file, it is necessary to put other jquery-related JS files behind the jquery file .

I've always had some doubts about the closure of the tags, but there's no point in XML, but in HTML it seems that the odds are higher.

For example a Div, the general form is this: <div id= "Theidofthisdiv" ></DIV> Because in many cases, we can define the div block's behavior size property in JS or CSS, there is no content between the tags, Therefore, I always think that writing <div id= "Theidofthisdiv"/> should be logical, but if you do, you will find that browser support is problematic.

Internet Explorer calls jquery a small issue to note

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.