JS gets the value into the array, in the upload to PHP file, how to complete? (online, etc.)
JS Code:
function Queren () {
var arr = new Array ();
var checkbox = document.getelementsbyname ("name");
for (var i = 0; i
if (checkbox[i].checked = = True) {
Arr[i] = Checkbox[i].value;
}
}
}
I want to assign the value of Checkbox[i].value to Arr[i], and then accept it in the php file, JS write the right? How should php files be received? Novice seeking code ....
------Solution--------------------
Using Ajax to manipulate
------Solution--------------------
PHP Code
function Queren () { var arr = new Array (); var checkbox = document.getelementsbyname ("name"); for (var i = 0; i
------Solution--------------------
1. Using AJAX, return data type with JSON
2. Use Ajax, return string, form similar to STR1,STR2,STR3, PHP received and then use explode processing array.