2014-04-25 36 views
1

我正在開發一個使用JS代碼的Grails項目。它在Google Chrome (v34.0.1847.116 m)Mozilla Firefox (v28.0),完美運行,但它不會運行/開始在IE (v9.0.23).我只是有一個空白的屏幕。Grails應用程序不僅僅在IE9中加載:我必須檢查什麼?

根據以前對SO社區的許多回答,我應該檢查一些我正在使用的元標記,但無論如何它都不能成功運行。有我的代碼!

page.gsp,用作主要佈局:

<!DOCTYPE html> 
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]--> 
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]--> 
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]--> 
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]--> 
<!--[if (gt IE 9)|!(IE)]><!--> 
<html class="win firefox firefox2 gecko gecko2" lang="br"> 
<!--[endif]--> 

<head> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
    <meta http-equiv="Cache-Control" content="no-cache"> 
    <meta http-equiv="Pragma" content="no-cache"> 
    <meta http-equiv="Expires" content="-1"> 
    <title><g:layoutTitle default="A nice Title"/></title> 
    <r:require modules='core'/> 
    <g:layoutHead /> 
    <r:layoutResources />  
</head> 

<body> 
    <div id="container"> 
     <div id="header">bla bla bla<g:navbar /></div> 
     <g:menu menuKey="1"/> <!-- a taglib which builds a dynamic menu --> 

     <div id="content"> 
      <g:layoutBody /> 
     </div> 
    </div> 

    <div id="footer"><div class="container">bla bla bla</div></div> 
    <r:layoutResources/> 
</body> 
</html> 

home.gsp,一個簡單的視圖到在上面的佈局被加載。

<html> 
<head> 
    <meta name="layout" content="page" /> 
</head> 
<body> 
    <h2>A simple content here</h2>    
</body> 
</html> 

我加載我所有的JS和CSS資源使用ApplicationResources.groovy但我沒有根據我Firebug的任何JS錯誤。畢竟,我還能檢查什麼,或者我必須確定哪些功能/功能的成功?

回答

3

變化

<!--[if (gt IE 9)|!(IE)]><!--> 
<html class="win firefox firefox2 gecko gecko2" lang="br"> 
<!--[endif]--> 

到(正確關閉其他評論)

<!--[if (gt IE 9)|!(IE)]><!--> 
<html class="win firefox firefox2 gecko gecko2" lang="br"> 
<![endif]--> 
+1

上帝保佑你的下一個99個世代 –

+4

我懷疑你要一點點瘋狂。 –

+2

@VictorFS看起來像是從心底涌出的評論。 :) – dmahapatro

相關問題