How to use javascript to obtain the control value

Source: Internet
Author: User
How to use javascript to obtain the control value Page. php & lt; inputtype = & quot; text & quot; name = & quot; date & quot;/& gt; & lt; inputtype = & quot; button & quot; value = & quot ;.... how to use javascript to obtain control values
Page a. php



Click the button... and a calendar will pop up. after a date is selected on the calendar, the date will be displayed in the date text box.

I want to know how to get the content of the date text box and then pass the content to the B. php page, and the page does not jump. How can I obtain this value in B. php?

I am very grateful for the help of experts. any method can be used to achieve this. as long as the page is not redirected, please provide more details.

------ Solution --------------------
To minimize the modification, add the target and a hidden iframe in form. Yourframe is consistent.




------ Solution --------------------
Use ajax to request B. php.
Http://www.w3school.com.cn/ajax/ajax_asp_php.asp
------ Solution --------------------
Are you using jq or what?

You can add an id in input to obtain
$ ('# ID'). val ();

This is the case if no id is added.
$ ('Input [name = date] '). val ();


If the form is submitted directly, follow the steps on the # 1st floor.
If ajax is used, it is said on the second floor.

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.