Use Edge mode to notify Internet Explorer to display content in the highest-level available mode

Source: Internet
Author: User

First, Easyui $ window (' open ') in Compatibility issues under IE8

Today in the company use Easyui's $ (' #win '). Window (' open '); method when you open a window form, the Eaysui script is found to be incompatible when executed under IE8

The HTML code is as follows:

1 <ahref= "javascript:void (0);"class= "Easyui-linkbutton"onclick= "$ (' #batchImportUser '). Window (' open ')">Bulk Import Users</a>2 3 <DivID= "Batchimportuser"class= "Easyui-window"title= "Bulk Import Users"4 style= "width:600px; height:200px"5 data-options= "Iconcls: ' Icon-save ', modal:true,collapsible:false,minimizable:false,closed:true">6             <DivAlign= "Center">7Please select a department:<inputID= "OrgId1"name= "OrgId1"class= "Easyui-combotree"style= "width:150px;">8                 <inputtype= "hidden"ID= "OrgName1">&nbsp;&nbsp;Whether to overwrite:<inputtype= "checkbox"ID= "Override"name= "Override"><BR/>9Bulk Import Users:<inputwidth= "0px"type= "File"ID= "Importuser"name= "Importuser">Ten                 <inputtype= "button"value= "Import"onclick= "Ajaxfileupload ()"> One             </Div> A </Div>

"$ (' #batchImportUser ') will be executed when the button is clicked. Window (' open ')" This code opens Easyui-window, as shown in the IE8 browser open form:

  

Windows Forms that are open under Firefox and Google are normally displayed as shown in:

  

Depressed ah, under IE8 Incredibly is such effect, check for a reason, originally is IE8 parse the HTML content of the page and execute JavaScript script used to parse the

  

Change to use the mode to parse can open normally

Ii. Solutions

Find out the problem, the following record the solution, in the head tag of the page, add the following code:

1 < Head > 2     <  http-equiv= "x-ua-compatible"  content= "Ie=edge"> 3 </ Head >

This code means " use Edge mode to notify the InternetExplorer browser to display content in the highest available mode." ", so that you can parse the HTML and execute JavaScript scripts under IE8 so that the window form is open normally, as shown in:

  

Sometimes this kind of browser parsing mode is really very deceptive, always think it is their own code to write a problem, but in fact, it is the browser parsing mode caused, these small details of things still have to record, and then encounter similar situation can know how to solve!

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.