Home  >  Article  >  Web Front-end  >  Data transfer code between Javascript forms_form effects

Data transfer code between Javascript forms_form effects

WBOY
WBOYOriginal
2016-05-16 18:57:541056browse

First, the simplest is the data transfer of forms in the same web page.
For example, there are two forms on a web page, each with a text box and a button. Click the buttons to operate the value of each other's text box. The example we gave is to pay one text box to another text box. The specific HTML code is as follows:

Copy code The code is as follows:



Untitled Document

< ;/head>








< /html>

The above is the HTMl code. You may have noticed the onclik code. There are two functions. Next is the JAVASCRIPT code:
Copy code The code is as follows:



Second, the second is to transfer data between the text boxes of the form between the two windows. In fact, this can be expanded on the original basis. Regarding how to create a pop-up window and the code of the form in the form, I won’t go into details here. Now let’s talk about how to operate the data of the text box in the form of the parent window. The specific code is as follows:
Copy code The code is as follows:



Third, the third way is to transfer data between the text boxes of the form between frame web pages.
What should be noted is the way the frame is written:
Copy the code The code is as follows:


//Define the name of the frame


<body> <br></body>

The specific implementation code is as follows:
Copy code The code is as follows:



The text box between these three types of windows A simple method for numerical interoperability has been implemented. What else needs to be noted is the relationship between them.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn