ExtJS: Convert html form to ExtJS

后端 未结 2 1435
囚心锁ツ
囚心锁ツ 2021-02-06 10:33

I want to be able to convert a html form to an ExtJs form. I have read that you have to do something with applyTo but wasn\'t really sure about what to do.

I hope someon

2条回答
  •  臣服心动
    2021-02-06 11:19

    Additionally, who is interested, buttons can be converted too:

     var objArray = Ext.DomQuery.select("input[type=button]");      
     Ext.each(objArray, function(obj) {      
         var btn = new Ext.Button({      
             text : obj.value,      
             applyTo : obj,      
             handler : obj.onclick,      
             type : obj.type      
         });      
         btn.getEl().replace(Ext.get(obj));      
     });   
    

    Information was found here (not in English, sorry).

提交回复
热议问题