How can the values of different forms be obtained together?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.