[英]How to add div to extjs object?
I have a javascript method. 我有一个javascript方法。 This method using div object for work. 此方法使用div对象进行工作。 For example: 例如:
g = new Method(document.getElementById(div_id),... }).
How to add result of this method to Extjs tab panel ?, 如何将此方法的结果添加到Extjs选项卡面板?,
tab.add({ html: "<div='div_id'></div>" })
- it's work, but I tthink is not correct. -可以,但是我认为不正确。
In the code where you create the tab you can get the div by the following: 在创建选项卡的代码中,可以通过以下方式获取div:
var theDiv = Ext.get("div_id");
tab.add({renderTo : theDiv }) //I believe that should work but I haven't test it.
So you could modify the div in your function. 因此,您可以在函数中修改div。 Then in EXT use the above method to get the div and add it to the tab. 然后在EXT中使用上述方法获取div并将其添加到选项卡。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.