Re: [問題] JavaScript一問

看板Web_Design作者 (Benny)時間19年前 (2006/10/04 17:40), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串3/3 (看更多)
※ 引述《banco (Acoustic)》之銘言: : 我現在有兩個頁面 A 跟 B : A 頁面當中有一個鏈結 <A> I, anchor </A> : 現在我想要的功能是按了這個鏈結之後 : "I, anchor" 這串文字會直接貼在 B 頁面中一個已經 focus 的 input text 當中 : 這一部份 JavaScript 該怎麼完成呢? a.htm : <input type="button" value="open window" onclick="b=window.open('b.htm');" /> <br /> <input type="button" value="I, anchor" onclick="doPaste()" /> <script> function doPaste(){ pos = window.b.document.getElementById('b0').value; window.b.document.getElementById(pos).value='paste'; } </script> b.htm : focus on any one of them<br /> <input type="hidden" id="b0" value="b1" /> <input type="text" id="b1" onclick="document.getElementById('b0').value=this.id" /><br /> <input type="text" id="b2" onclick="document.getElementById('b0').value=this.id" /><br /> <input type="text" id="b3" onclick="document.getElementById('b0').value=this.id" /> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.162.201.228 ※ 編輯: bennylu 來自: 218.162.201.228 (10/04 17:48)

10/04 18:07, , 1F
感謝,推~~~~
10/04 18:07, 1F
文章代碼(AID): #158u6Ohj (Web_Design)
討論串 (同標題文章)
本文引述了以下文章的的內容:
2
2
完整討論串 (本文為第 3 之 3 篇):
2
2
文章代碼(AID): #158u6Ohj (Web_Design)