dojo.require("dijit.form.FilteringSelect");//扩展下拉菜单
var combo = new dijit.form.FilteringSelect({
searchAttr: "name",propercase: true,
colspan: 2,
style: {width: '150px', margin:'5px 0 0 0', float: 'right'},
store: new dojo.data.ItemFileWriteStore({
url:'请求地址',
labelAttribute: "name"
}),
refresh: function(pid){
var oThis = this;
dojo.xhrPost({
url:'请求地址',
handleAs: "json",
content: {
pid: pid
},
load: function(data){
oThis.set('store', new dojo.data.ItemFileWriteStore({data:data}));
}
});
},
onChange: function(nv){
var oThis = this;
alert(oThis.get('displayedValue'));
alert(oThis.get('value'));
}
})