zoukankan      html  css  js  c++  java
  • 窗体之间的交互(window.opener)

    窗体之间的交互(window.opener)
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>无标题页</title>
        <script language="javascript" type="text/javascript">
            function openwindow()
            {
                window.open("OpenerWindow.htm","newwin","height=300,width=500,top=100,left=100resizable=yes");
            }
        </script>
    </head>
    <body>
        <form name="form1" action="" method="post">
            <input name="text1" />
            <input type="button" onclick="openwindow()" value="Open New Window" />
        </form>
    </body>
    </html>

    第二个页面
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>无标题页</title>
         <script language="javascript" type="text/javascript">
              function getText() {
                document.form1.text1.value = window.opener.document.form1.text1.value;
              }
        </script>
    </head>
    <body onload="getText()">
        <form name="form1" action="" method="post">
            <input name="text1" />
        </form>
    </body>
    </html>

  • 相关阅读:
    C++读写文件并排序
    我的vim配置---jeffy-vim-v2.2.tar
    vim 代码注释插件
    我的vim配置---jeffy-vim-v2.1.tar
    linux中screen命令的用法
    Install and Enable Telnet server in Ubuntu Linux
    Telnet环境变量
    Telnet窗口尺寸选项
    TELNET终端类型选项
    Telnet技术白皮书
  • 原文地址:https://www.cnblogs.com/chengpeng/p/2146040.html
Copyright © 2011-2022 走看看