/**
* form 을 json형태로 변환
* @param dArr
* @return
*/
function fncJsonSerialize(dArr) {
var dObj = {};
$.each(dArr, function() {
if (dObj[this.name] !== undefined) {
if (!dObj[this.name].push) {
dObj[this.name] = [dObj[this.name]];
}
dObj[this.name].push(this.value || '');
} else {
dObj[this.name] = this.value || '';
}
});
return dObj;
}
댓글 없음:
댓글 쓰기