PHP弹出子窗口给父窗口传值
父窗口 addpayway.php
.................... <tr> <td width="27%" align="right" class="but" >会员ID:</td> <td width="219%" colspan="5" class="but" style="PADDING-LEFT: 10px" > <script type='text/javascript'> function openWindow() { window.open('User_Manage_select.php','_blank','height=450,width=470,status=no,toolbar=no,menubar=no,scrollbars=no,location=no'); } </script> <input name="UserID" type="text" id="UserID" onclick="openWindow()"></td> </tr> ....................
PopUp页面当中 User_Manage_select.php
.................... <input name="UserID<?php echo $rs->Fields(userid)->value;?>" type="hidden" id="UserID<?php echo $rs->Fields(userid)->value;?>" value="<?php echo $rs->Fields(userid)->value;?>"> ....................
<script type="text/javascript"> function popup(xxx) { //alert(xxx); //window.opener.document.getElementById("UserID").value=document.getElementById("UserID").value; window.opener.document.getElementById("UserID").value=xxx; window.close() } </script> <input type="button" value=" 选 择 " name="button1" onClick="popup(<?php echo $rs->Fields(userid)->value;?>)" /></td> ....................
|