f1.php page JS code, the second passed parameter must be self and cannot be anything else
<script type="text/javascript"> function dianJi(){ //弹出窗口关闭前,原窗口不能获得焦点 //showModalDialog("f2.php",self,"dialogwidth=500px;dialogheight=500px;dialogtop=100px;dialogleft=100px;center=no;help=no;resizable=no;status=no;scroll=yes"); //弹出窗口不影响原窗口获得焦点 window.showModelessDialog("f2.php",self,"dialogwidth=500px;dialogheight=500px;dialogtop=100px;dialogleft=100px;center=no;help=no;resizable=no;status=no;scroll=yes"); } function back_db(a){ $("input[name='text2']").val(a); } </script>
HTML code
<input type="button" onclick="dianJi()" value="触发"/> <input type="text" id="text1" value="hello world!"/> <input type="text" name="text2" value="hello!"/>
f2.php page, parent.dialogArguments and window. dialogArguments has the same effect, and getElementById must be used here, and getElementByName cannot be used
<script type="text/javascript"> //parent.dialogArguments.document.getElementById("text1").value="你好世界!"; window.dialogArguments.document.getElementById("text1").value="你好世界!"; window.dialogArguments.back_db("你好!"); </script>
For more window.dialogArguments usage instructions, please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 English version
Recommended: Win version, supports code prompts!

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
