1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| var postData = "";
var fields = form.elements;
for (var i=0; i < fields.length; i++) {
if (fields.name != "") {
type = fields.type;
if ((type == 'radio') || (type == 'checkbox')) {
if (!fields.checked) { continue; }
}
if ((type == 'submit')&&(!(fields.name == submitName))) {
continue;
}
if (postData) { postData += "&"; }
postData += fields.name + "=" + encodeURIComponent(fields.value);
}
}
postData += "&checkflag=1";
|