dijit.byId("grid") is undefined,dijit.byidgrid

來源:互聯網
上載者:User

dijit.byId("grid") is undefined,dijit.byidgrid

1、錯誤描述

TypeError:dijit.byId(...) is undefined

    (68 out of range 3)


2、錯誤原因

   var gridName = dijit.byId("grid").getValue();

   在擷取表格中的某列某行中的名稱,但是對應的ID改變了,dijit.byId("grid").getValue()這個的ID未變,導致出錯


3、解決辦法

   修改dijit.byId("grid").getValue()中的ID,保證這個ID存在




dojo中 alert(dijitbyId("username"))為何是undefined!

你用firebug調試一下,看看到底報的是什麼js錯誤的,如果是dijit undefined或者dojo undefined 那就是js檔案沒有能正確引入。
如果不是上面的情況查看一下你頁面裡面的id是否正確或者是否有重複。
另外你要注意dijit.byId()跟dojo.byId()的區別,前者它只對有dojoType標籤屬性或編程式產生的標籤有作用,返回一個dijit._Widget對象 ;後者跟document.getElementById()方法一樣,返回一個DOM對象。
或者你需要用dojo.byId()試一下
 
Extjs的GridPanel的load方法報thisproxy is undefined錯誤

調用load方法首先要在你的store裡定義一個porxy
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.