Data transfer between JavaScript forms

Source: Internet
Author: User
Javascript| data today, a friend asked me about using JavaScript to carry out the data transmission between the pages of the page, I have written before, but never noticed, today summed up a bit, I hope to give you some help, but also help me to sum up the previous learned, used knowledge.

One, the simplest is the same page in the form of data transmission.

For example, there are two forms on a Web page, a text box in each form, and a button. The point button pairs each other to manipulate the value of each other's text box. The example we give is to pay a text box to another text box. The specific HTML code is as follows:



untitled document











The above HTML code, you may notice the Onclik code, there are two functions, followed by the JavaScript code:

Two, the second is data transfer between the text boxes of a form between two windows.

In fact, this can be based on the original to carry out a number of extensions on it. about how to create pop-up windows, forms in the form of the code, here is not much to say, now here to say how to manipulate the parent window of the text box in the form of data. The specific code is as follows:



Three, the third is the frame page between the form of the text box between the data transfer.

The place to note is the wording of the frame:


//define the name of the frame


<body></p></p> <p><p></body>

The specific implementation code is as follows:



The simple method of manipulating text box values between these three types of Windows is achieved, and the other thing to be aware of is their relationship.

In fact, very simple, Hong, I hope that we communicate with each other, qq:171476439,



Related Article

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.