How can the values of different forms be obtained together? & Lt; METAcontenttexthtml; charsetgb2312http-equivContent-Type & gt; & lt ;? Phpecho & quot; & nbsp; & lt; formnameform1mothodGET & gt; & lt; inputtypecheckboxnameC1 how can we get the values of different forms together?
Echo"
";
?>
The code is as above; the problem is that after you click the submit button, you can only get the value of the form1 form. The value displayed in the form2 category is not obtained. if you delete onclick = \ "document. f1.submit (); return false; \ ", you can only get the value displayed in the form2 category but not the value of the check box in form1,
How can I get the value of 2 at the same time?
Because the function I want is to select the form1 option and then use the value of form2 to change the attributes in the form1 option. submitting is execution.
------ Solution --------------------
Write
Script
Function foo (){
Var input = document. createElement ('input ');
Input. type = "hidden ";
Input. name = "showtype ";
Input. value = document. form2.showtype. value;
Document. form1.appendChild (input );
Document. form1.submit ();
Return false;
}
Script
------ Solution --------------------
Print_r ($ _ POST );
------ Solution --------------------
Method = post
------ Solution --------------------
All methods are written incorrectly.