Home >Web Front-end >JS Tutorial >JavaScript child form parent form mutual value transfer method_javascript skills

JavaScript child form parent form mutual value transfer method_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 18:25:591288browse

The streamlined version of Script House. Generally, many cms have some such functions. The selection related articles in dedecms also use such a function. The specific code is given below.
Core code of parent page:

Copy code The code is as follows:

<script> <br>function SelectArcListA(fname){ <br>var posLeft = 10; <br>var posTop = 10; <br>window.open("content_select_list.asp?f=" fname "&k=" form1.keyword.value , "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=700,height=500,left=" posLeft ", top=" posTop); <br>}<br></script>


Core code of sub-page:
Copy code The code is as follows:




Enter data in the new pop-up form , transferred to the parent form.






Click here to pop up the subform





< ;!-- ======= Subform: Named childform.html ======= -->
Copy code The code is as follows:




After entering the data in the pop-up window, it will be returned to the parent form--subform













Click here to return




//The child form and the parent form pass values

1. Create two new pages, one is Parent.html
Copy the code The code is as follows:




Parent form






< ;label>






The other is a subform:
Copy code The code is as follows:





Subform










2. Perform the assignment operation through the setValue(m_strValue) of the parent form executed by the child form.
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
Previous article:jQuery gets the object and locates the sub-object_jqueryNext article:jQuery gets the object and locates the sub-object_jquery

Related articles

See more