该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
easyui 1.7.2
一个编辑对话框要提交的时候想遍历一下form上的所有需要提交元素的name属性及值,结果发现在处理easyui-combobox的时候得到的值总是怪怪的,会多出一到两组数据,请教下是何原因,不知道各位吧友是如何实现的?
代码如下:
getInputData("fm");
function getInputData(id){
var data = "[{";
$("#"+id+ " input").each(function(){
data += "\""+$(this).attr("name")+"\":\""+$(this).val()+"\",";
});
data = data.substr(0,data.length -1 );
data += "}]";
}
User ID:
User Name:
Password :
User Group:
url="../../AJAX/user/getGroupName.ashx" valuefield= "ID"
textfield= "USERGROUP">
DEPT:
url="../../AJAX/user/getDepartment.ashx" valuefield= "ID"
textfield= "DEPARTMENT">
Default FAB:
url="../../AJAX/user/getFactory.ashx" valuefield= "ID"
textfield= "FACTORYNAME">
Default Zone:
url="../../AJAX/user/getArea.ashx" valuefield= "ID"
textfield= "AREANAME">
E-Mail:
Tel NO: