// 去除序列化空值
function
serializeNotNull(
serStr) {
return serStr.
split(
'&').
filter(
function (
str) {
return
!str.
endsWith(
'=');
}).
join(
'&');
};
function
jsonify(
doc,
element) {
var aaa
=
serializeNotNull(
decodeURIComponent(
$(doc).
serialize().
replace(
/
\+
/
g,
" ")));
var dataone
= {};
var arrify
= aaa.
split(
'&');
for (
var i
=
0; i
< arrify.length; i
++) {
var itemify
= arrify[i];
var item
= itemify.
split(
'=');
dataone[item[
0]]
= item[
1];
}
;
return dataone;
};