Can I submit different pages with different knob?-php Tutorial

Source: Internet
Author: User
Can I submit data to different pages by clicking different buttons? there is a form that submits some data. I have two ways to process the data, but the two methods are located on two different pages. Can I submit it to a different page by pressing the different "de" button? Thank you! ------ Solution ------------------ submit with js ------ solution ---------------------- & l can I submit data to different pages by pressing different buttons?
There is a form that submits some data. I have two methods to process the data, but the two methods are located on two different pages. Can I submit it to a different page by pressing the different "de" button?
Thank you!


------ Solution --------------------
Submit with js
------ Solution --------------------


------ Solution --------------------
Use js to control form actions
------ Solution --------------------

------ Solution --------------------
Although JavaScript can be easily used, note the following:
1. if the browser script function is disabled
2. if a control named action is placed in the form
Then you can't laugh.

The correct method is to judge the value of the submit button (name the submit button) in php to load different handlers.
------ Solution --------------------
Reference:
Although JavaScript can be easily used, note the following:
1. if the browser script function is disabled
2. if a control named action is placed in the form
Then you can't laugh.

The correct method is to judge the value of the submit button (name the submit button) in php to load different handlers.


First, I have never seen JavaScript browsers disabled for so many years.
Second, give the FORM an ID, and then JS directly operates the action of this ID.
Third, what if different pages are submitted in different languages?

The correct method is to give the form an id, and then document. getElementById obtains the object, and then add the onclick event on different submit events to change the submission address of the action before submitting.
------ Solution --------------------
# Baidu or google first if you don't understand what others say on the 7th floor. # Good on the 6th floor ~~
------ Solution --------------------
I learned the method on the 6th floor.
------ Solution --------------------
Generally, JavaScript can be implemented.
------ Solution --------------------
You get those values in js first
Then get and submit different pages...
------ Solution --------------------
I think double insurance is better.
Use js or php to determine

However, after all, users who disable JavaScript are basically absent.

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.