Начало
Формы
Передайте Textbox (в структурах)
Копирует текст в коробке в левой структуре в коробку в правильной структуре, когда кнопкой щелкают.
Click to
[ Simply close the demo window to return to this page. ]
JavaScript Forms: Передайте Textbox (в структурах)
<!-- THREE STEPS TO INSTALL PASS TEXTBOX (IN FRAMES): 1. Copy the entire first code section into your FRAMESET document 2. Save the second code into a new page, pass-textbox-framesl.html 2. Paste the second code into a new page, pass-textbox-framesr.html --> <!-- STEP ONE: Paste this entire code into your FRAMESET page --> <html> <head> <script language="JavaScript"> <! > <! > <!-- Begin function passText(str) { top.frames['right'].document.yourform.msg.value = str; } // End --> </script> </head> <frameset cols="300,*" frameborder=1> <frame name="left" src="pass-textbox-framesl.html"> <frame name="right" src="pass-textbox-framesr.html"> </frameset> </form> </body> </html> <!-- STEP TWO: Copy this code into a new page --> <!-- Save the page as: pass-textbox-framesl.html --> <html> <body> <center> <form name=myform> Enter Your Name:<br> <input type=text name=user size=10 value=""> <input type=button value="Ok!" onClick="parent.passText(this.form.user.value);"> </form> </center> </body> </html> <!-- STEP THREE: Copy this code into a new page --> <!-- Save the page as: pass-textbox-framesr.html --> <html> <body> <form name=yourform> <input type=text name=msg size=10 value=""> </form> </body> </html> <p><center> <font face="arial, helvetica" SIZE="-2">Free JavaScripts<br> by <a href="http://javascripts-do.narod.ru">JavaScripts</a></font> </center><p> <!-- Script Size: 1.38 KB -->