将form表单中的元素转换成对象的方法适用表单提交

时间:2014-05-02    点击:385   

复制代码 代码如下:

function serializeObject(form){
var o ={};
$.each(form.serializeArray(),function(index){
if(o[this['name']]){
o[this['name']] = o[this['name']] +","+this['value'];
}else{
o[this['name']] = this['value'];
}
});
return o;
}

JavaScript打印网页指定区域的例子
js检测输入内容全为空格的方法
离开当前页面前使用js判断条件提示是否要离开页面
js日期联动示例
jQuery实现的多选框多级联动插件
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved