Home > Web Front-end > JS Tutorial > How to return value from javascript pop-up page_javascript skills

How to return value from javascript pop-up page_javascript skills

WBOY
Release: 2016-05-16 16:17:33
Original
1388 people have browsed it

The example in this article describes the method of returning a value from a javascript pop-up page. Share it with everyone for your reference. The specific implementation method is as follows:

a1.html

Copy code The code is as follows:



Window 1



Window 1





<script> <br> function test(){<br> ​ window.open('b1.html','newwindow','height=100,width=400') ;<br> }<br> </script>

b1.html

Copy code The code is as follows:



New Document



Window 2




<script> <br> function test(){<br> var bValue = 111;<br> ​ window.opener.a.value = bValue ;<br> window.close(); <br> } <br> </script>

I hope this article will be helpful to everyone’s JavaScript programming design.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template