2013-07-30 44 views
0

工作,我想設置的風格屬性,在道場div標籤1.8.I使用了下面的代碼。Dojo- domAttr.set不是在IE

require([ 
     "dojo/request", 
     "dojo/store/Memory", 
     "dgrid/OnDemandGrid", 
     "dojo/store/JsonRest", 
     "dojo/dom", 
     "dojo/dom-attr" 
    ], function (request, Memory, OnDemandGrid,JsonRest,dom,domAttr) { 
      jsonstore = new JsonRest({target: url,idProperty: "srno"}); 
      grid = new OnDemandGrid({ 
       store: jsonstore, 
       columns: Layout, 
       minRowsPerPage : 40, 
       maxRowsPerPage : 40, 
       keepScrollPosition : true, 
       loadingMessage: "Loading data...", 
       noDataMessage: "No results found." 
      }, "grid"); 
      domAttr.set(dom.byId("grid"),"style","height:250px"); 
      grid.startup(); 
     }); 

它正常工作與firefox.In IE瀏覽器,下面的代碼是不工作

 domAttr.set(dom.byId("grid"),"style","height:250px"); 

我把警報和驗證。

  alert(domAttr.get(dom.byId("grid"),"style") 

在firefox中,它顯示高度:250px。在IE中它是空的。 誰能告訴我如何使domAttr.set工作在IE瀏覽器中呢?

回答