jquery combobox 前台添加空行

艾灿
2023-12-01

	var dataArr =new Array();
	var dataObj = new Object();
	dataObj.dictcode = '';
	dataObj.dictname = '全部';
	dataArr.push(dataObj);
	for(var j = 0; j < obj.result.length; j++ ){
		dataObj = new Object();
		dataObj.dictcode = obj.result[j].dictcode;
		dataObj.dictname = obj.result[j].dictname;
		dataArr.push(dataObj);
	}
	$("#year").combobox({
  		valueField:'dictcode',
		textField: 'dictname',
		editable:false,
		data:dataArr
	});
 类似资料: