window.top.frames["w_right"].document.getElementById('id').value=request("sendid");

解决方案 »

  1.   

    用cookie
    send.html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
     <HEAD>
      <TITLE> a.html </TITLE>
    </HEAD>
    <script language="javascript">
    function writeCookie(s){document.cookie="a="+s+";"}
    </script>
     <BODY><form method=post action='b.htm'>
     <input TYPE="text" id="sendid" name="sendid" SIZE="10" maxlength="10"> 
    <input type=submit value='tj' onclick="javascript:writeCookie(document.getElementById('sendid').value)">
    </form>
     </BODY>
    </HTML>
    login.htm:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <title></title>
    <script language="javascript">function getSendID(s){
      var c = document.cookie;
      var start = c.indexOf(s + "=");
      if (start== -1){alert("cookies not found");return;}
      
      start=c.indexOf("=",start)+1;
      var end = c.indexOf(";",start);
      if (end==-1){end=c.length;}
      if (c.substring(start,end)==null) {alert("No cookies found!");return;}
      document.getElementById('recvid').value=c.substring(start,end);
    }
    </script>
    </head>
    <body onload='getSendID("a");'>
    <input ID="recvid" NAME="id" TYPE="text" SIZE="10" maxlength="10"> 
    </body>
    </html>
      

  2.   

    我用2楼的方法提示:
    HTTP 错误 405 - 用于访问该页的 HTTP 动作未被许可可能是html页面不支持动态的脚本?
    接着用3楼的方法来试...
      

  3.   

    静态网页怎么会支持ASP语句呢?1楼可能是疏忽了你文件的后缀,呵呵
      

  4.   

    出现意料外的问题我把METHOD="POST" 改成 METHOD="get"就不会报这个错
      

  5.   

    用POST一直要报错:HTTP 错误 405 - 用于访问该页的 HTTP 动作未被许可另外2楼的方法只能用在服务器端吧,客户端用request要报错啊。
      

  6.   

    去掉FORM,没用。send.html:<script language="javascript">
    function writeCookie(s){
      document.cookie="a="+s+";";
      location.href='b.htm'; //这里跳转
    }
    </script><input TYPE="text" id="sendid" name="sendid" SIZE="10" maxlength="10"> 
    <input type=button value='tj' onclick="javascript:writeCookie(document.getElementById('sendid').value)">
      

  7.   

    send.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Untitled Document</title>
        </head>
        <body>
            <form action="frame_login.html" method="get">
                <input NAME="sendid" TYPE="text" SIZE="10" maxlength="10" value="aaa">
    <input type="submit" value="submit">
            </form>
        </body>
    </html>frame_login.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Untitled Document</title>
        </head>
        <script>
            window.onload = function(){
                var s1 = window.location.href.match(/sendid=.*?$/g);
                var val = "";
                if (!s1 || !s1[0]) {
                    return;
                }
                var s2 = s1[0].match(/[^\=]*$/g);
                if (!s2 || !s2[0]) {
                    return;
                }
                var val = decodeURI(s2[0]);
                window.frames["w_right"].document.getElementById("text1").value = val;
            }
        </script>
        <frameset rows="50%,*">
            <frame name="w_right" src="login.html" scrolling="auto" resize>
        </frameset>
    </html>
    login.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <body>
    <h1>login.html</h1>
    <input type="text" id="text1" value="">
    </body>
    </html>