开发者

Proper way to embed EXTJS in html

What is the recommended way to stick Extjs elements in your html?

At the moment I have

<div><script type='text/javascript'>
    Ext.onReady(function(){
         new Ext.grid.Panel({params...}).show();
    })
</script></div>

But this feels very awkward ( Embedding script tags all over the place rankles my soul )

Components have a renderTo, but if the html element doesn't exist, - I think? ( not too sure about that ) - that the component still开发者_StackOverflow社区 gets created.


It depends entirely on what you want to do, check out the learning centre on Sencha:

http://www.sencha.com/learn/

http://www.sencha.com/learn/components/

Usually you use a complete layout system, though if you want to attach to an existing element, such as a div you'll need something like renderTo.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜