ExtJS更新Panel的html内容
第一次赋html值是正常的,之后每次赋值都不会改变html内容,代码如下
{
colspan: 8,
border: 0,
ref: "detail",
id: "id_detail",
bodyStyle: 'padding:15px; text-align:center; line-height:25px;',
html: '<div id="div_detail"></div>'
}
有没办法更新到html内容?
------解决方案--------------------Ext.getCmp('id_detail').update(html_content);
------解决方案-------------------- <div id='loading-mask'>
</div>
<div id='loading'>
<div class='loading-indicator'>
<img align='absmiddle' src='/res.axd?img=loading_32.gif&v=1' /></div>
</div>
<div id="PageManager1_wrapper">
</div>
<div id="ContentPanel1_content" class="x-hide-display">
没有改变之前!
</div>
<script>
Ext.onReady(function () {
X.init();
var x0 = new Ext.Panel({ x_state: {}, id: "ContentPanel1", cls: "x-form-item", bodyStyle: "padding:0px;background-color:#DFE8F6;", border: false, animCollapse: true, contentEl: "ContentPanel1_content", collapsible: false, collapsed: false, header: false, listeners: { render: function (component) { Ext.get('ContentPanel1_content').show(); } } });
X.util.removePageLoading(false); var x1 = new Ext.ux.FormViewport({ x_state: {}, id: "PageManager1", renderTo: "PageManager1_wrapper", layout: "fit", border: false, items: x0 });
X.ready();
});
function onReady() {
jQuery("#ContentPanel1_content").html("我要改变你!");//这里有jQuery直接操作
}
</script>