以下商店在 google chrome 和 firefox 中运行,它不适用于 IE 8
var store = new Ext.data.JsonStore({
fields: ['productname'],
url: 'productnames.jsp',
autoLoad: true });new Ext.form.ComboBox({
fieldLabel: 'Product Name',
hideTrigger: true,
name: 'productname',
id:'productname',
mode: 'local',
store: store,
displayField: 'productname',
triggerAction: 'all',
emptyText:'Select Product',
allowBlank: false,
editable: false,
forceSelection: true,
listeners:{select:{fn:function() {
var selectvalue=this.getValue();
store1.load({ params: {productname: selectvalue} });
} }},
anchor:'95%'
})
提前致谢