0
我的代碼:如何訪問HTML元素的Ext JS面板
var panel2 = new Ext.Panel({
id: 'myPane1',
html: "<div style='width:100%;background-color:pink'>" +"<div style='width:49%;border:1px solid blue;float:left' >" + "<input type='text' value='second one' style='width:95%;'></input></div><div id='checkmy_Id' style='width:49%;border:1px solid black;float:left' >" + myVal + "</div></div>" ,
listeners: {
render: function (panel2) {
alert('panel render..');
//console.log(document.getElementById('checkmy_Id').innerHTML);
}
}
});
如何與checkmy_Id
的id
值追加到div
。它給我一個錯誤:innerHTML is null.
如何解決這個問題?