2013-06-19 104 views
8

在IE9瀏覽器已成立:如何設置IE文檔模式?

F10 - >工具 - >兼容性視圖設置 - >添加192.168.10.227

因此,當我嘗試以服務文件,瀏覽器模式是9 compat的視圖,文檔模式是IE7標準。

我的問題是,我如何使文檔模式IE9而不是IE7?

我想:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9"> 
<meta http-equiv="X-UA-Compatible" content="IE=9" /> 

但也不是工作。

這裏是我的文檔

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    <head> 
     <title>OpsCentral&trade;</title> 
     <link rel="shortcut icon" type="image/x-icon" href="/opscentral/demo/favicon.ico" /> 
<link rel="icon" type="image/x-icon" href="/opscentral/demo/favicon.ico" /> 
<link rel="stylesheet" type="text/css" href="/opscentral/demo/css/main.css" /> 
<link rel="stylesheet" type="text/css" href="/opscentral/demo/css/widget_list.css" /> 
<script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.js"></script> 
<script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.ajaxq.js"></script> 
<script type="text/javascript" src="/opscentral/demo/js/util.js"></script> 
<!-- ******************************************************************* 
    WOM - Windows on Load Manager 
******************************************************************** --> 
<script type="text/javascript" src="/opscentral/demo/js/wom.js"></script> 
<script type="text/javascript" src="/opscentral/demo/js/widget_list.js"></script> 
<!-- ******************************************************************* 
    NIFTY CORNERS 
******************************************************************** --> 
<script type="text/javascript" src="/opscentral/demo/js/niftyCornersCube.js"></script> 
<link rel="stylesheet" type="text/css" href="/opscentral/demo/css/niftyCornersCube.css" /> 
    <link rel="stylesheet" type="text/css" href="/opscentral/demo/css/jQuery/jQuery.pagination.css" /> 

    <link rel="stylesheet" type="text/css" href="/opscentral/demo/css/widget_form.css" /> 

    <script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.dimensions.js"></script> 
    <script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.jTemplates.js"></script> 
    <script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.pagination.js"></script> 
    <script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.XMLUtils.js"></script> 


     <link rel="stylesheet" type="text/css" href="/opscentral/demo/css/calendar-blue.css" /> 
<script type="text/javascript" src="/opscentral/demo/js/widget_calendar.js"></script> 
<script type="text/javascript" src="/opscentral/demo/js/calendar/calendar.js"></script> 
<script type="text/javascript" src="/opscentral/demo/js/calendar/calendar-en.js"></script> 
<script type="text/javascript" src="/opscentral/demo/js/calendar/calendar-setup.js"></script> 

     <script type="text/javascript" src="/opscentral/demo/recordingJssCss/js/jquery-1.8.2.js"></script> 
<script type='text/javascript'> 
    var $jq182 = jQuery.noConflict(); 
</script> 
<script type="text/javascript" src="/opscentral/demo/recordingJssCss/js/jquery-ui-1.9.1.custom.js"></script> 
<link rel="stylesheet" type="text/css" href="/opscentral/demo/recordingJssCss/css/smoothness/jquery-ui-1.9.1.custom.min.css" /> 
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"> 
<meta http-equiv="X-UA-Compatible" content="IE=8" /> 
+0

在[這個問題](http://stackoverflow.com/questions/9182428/force-internet-explorer-9-to-use-ie-9-mode?rq=1),標記的答案建議放一個在** HTTP頭**中,不是HTML本身,你可以嘗試。 :) – Arkana

回答

5

我相信你需要包括

<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" /> 

編輯

我也會包括一個

<meta charset="utf-8" /> 

或什麼charset使用。將這些移動到頭頂也會有所改變。

+0

感謝您的回答:) – Stupidfrog

+0

這工作對我來說,我做到了[像這樣](http://stackoverflow.com/a/9624500/819417)。 –

-1

但根據IE開發中心,

另外,不要在網頁上使用「X-UA兼容」元標記或從Web服務器發送自定義HTTP標頭。

要強制在Internet Explorer 10中查看的網頁進入特定的文檔兼容模式,請先按F12鍵打開F12 Tools。然後,在瀏覽器模式菜單上,單擊Internet Explorer 10,然後在文檔模式菜單上單擊標準。