开发者

ExtJS: How to append child element to Ext.select() result?

I have this table structure:

<table class="x-toolbar-ct">
 开发者_如何学运维   <tbody>
        <tr>
            <td>col1</td>
            <td>col2</td>
        </tr>
    </tbody>
</table>

No luck with this code:

var row = Ext.select('.x-toolbar-ct').select('tbody').select('tr');
row.appendChild('<td>col3</td>');

So how to append new <td> element? Thank you.


We have to use createChild(), and use first() to return the first element.

var row = Ext.select(".x-toolbar-ct").first().first().first();
row.createChild("<td>col3</td>");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜