作者mattttt (我就是我)
看板PHP
標題Re: [請益] 如何將值傳回前一個畫面視窗??
時間Fri Apr 10 23:54:11 2009
我是這樣寫的
父頁(也就是一開始的網頁)
要用
javascript的window.open
也就是這樣寫
<script language="JavaScript" type="text/javascript">
window.open(網頁,標題,'modal=yes,width=600,height=400,
resizable=yes,scrollbars=yes,status=yes');
</script>
後面的都是參數
詳細的我忘了
就是這個參數
有些FIREFOX不吃
所以這就要自己去試了
我試了很久
子頁(也就是用window.open開出來的網頁)
這裡加上
window.opener
也就能控制父頁
例如:
<script language="JavaScript" type="text/javascript">
window.opener.document.getElementById('test').value = '';
</script>
父頁中ID TEST的VALUE變為空字串
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.50.57.247