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

How to return value from javascript pop-up page_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:17:331348browse

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.

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