Javascript can only run once.

Source: Internet
Author: User
I have created a fixed frame set on the left in Dreamweaver. The frame Page name is from the left of frame.html to the right of left.html. Code Set to <frameset rows = "*" Cols = "409, * "framespacing =" 0 "frameborder =" yes "border =" 0 "bordercolor =" # 0000ff "> <frame src =" left.html "name =" leftframe "scrolling =" No "noresize =" noresize "id =" leftframe "Title =" leftframe "/> <frame src =" right.html "name =" mainframe "id =" mainframe "Title =" mainframe" /> </frameset> <noframes> <body> </noframes> left.html code: <meta http-equiv = "Content-Type" content = "text/html; Charset = gb2312 "> <textarea name =" data "id =" data "Cols =" 52 "rows =" 12 "> </textarea> <br/> <input type = "Submit" onclick = "window. parent. frames. item (1 ). run () "name =" OK "id =" OK "value =" Submit "/> <! -- Window. parent. frames. item (1 ). run () is the run () function on the webpage right.html on the right --> the code of right.html is: <body> <SCRIPT type = "text/JavaScript"> function run () {window. parent. frames. item (1 ). location. reload (); // click it to refresh the webpage on the right, and then click the webpage right.html document. write (window. parent. frames. item (0 ). data. value); // use document.writeto output the value of "data" in the text area of left.html on the left-side webpage // alert (window. parent. frames. item (0 ). data. value); // use alertto display the value of "data" in the text area of left.html on the left-side webpage.} </SCRIPT> </body> I want to display the value of "data" in the text area of left.html on the left-side webpage in right.html on the right-side webpage; document is not used on the webpage. write (window. parent. frames. item (0 ). data. value); // use document.writeto output the value of "data" in the text area of left.html on the left-side webpage, and use alert (window. parent. frames. item (0 ). data. value); // use alertto pop up the value of "data" in the text area "data" in left.html on the left-side webpage. HT "Thank you!" is displayed in document. Write on ML !!!

document. Write generates a text stream. When the generated text stream is displayed on the page, it is no longer the previous page. How can this problem be solved ???

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.