如果当我选择不同的下拉框,我需要textfield的fieldLabel动态变化?
采纳的答案
2009-03-24 yourgame (架构师)
- Ext.onReady(function() {
- new Ext.form.FormPanel({
- renderTo : Ext.getBody(),
- items : [new Ext.form.TimeField({
- id : 'time',
- fieldLabel : 'Time',
- name : 'time',
- minValue : '8:00am',
- maxValue : '6:00pm',
- listeners : {
- 'select' : function(combo, record, index) {
- var msg = "";
- var a = combo.el.parent().parent().parent().first();
- for(var dd in a){
- msg += dd + " ";
- }
- a.dom.innerHTML = combo.getValue() + ":";
- }
- }
- })]
- });
- })