精華區beta Web_Design 關於我們 聯絡資訊
※ 引述《forkome (烏龜)》之銘言: : 請問各位大大,目前小弟A網頁有使用javascript語法window.open : 開啟另一個視窗B.htm後,B網頁裡有<input type="text" name="aaa"> : 若我想要A網頁按開視窗的同時,在B網頁的文字方塊裡也填上值 : 我要如何做呢?我有去查一下書好像用opener語法,但還是不會用Orz a.html內容 <script> var str = "唉呀~頭好痛!"; function abgne(){ window.open("b.html"); } </script> <INPUT TYPE="button" value="開啟" onclick="abgne();"> b.html內容 <input type="text" id="aaa"> <script type="text/javascript"> document.getElementById("aaa").value = opener.str; </script> 先開啟a.html後 會自動開啟b.html並把值填入在aaa中 -- ※ 編輯: abgne 來自: 202.154.192.30 (02/27 16:29)