a.htm和b.htm没有直接的关系,所以只能靠提交到asp页面才可以处理

解决方案 »

  1.   

    子页面用如下代码:
    <script language="javascript">
    function aa(){
     document.form1.inp.value=document.form1.year.value+document.form1.month.value;
     window.returnValue=document.form1.inp.value;
     window.close()
     //alert(window.returnValue);
    }
    </script>父页面用如下代码:
    function fPopUpCalendarDlg(){
    retval = window.showModalDialog("aaa.cfm", "", "dialogWidth:197px; dialogHeight:10px; status:no; directories:yes;scrollbars:no;Resizable=no;");
    var src= retval;
    document.form1.date.value = src;

    if( retval == null ){
    document.form1.date.value ="";
    }
    }
    这样就行了。
      

  2.   

    页面a.htm
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    function SelectMenus(dataMenuCode,dataMenuName)
    var wMenuSelectWindow = "";
    {
        sUrl = "b.htm?MenuCodeObj=" + dataMenuCode ;
    if (wMenuSelectWindow != "")
    {
     wMenuSelectWindow.focus();
    }
    else
    {
    wMenuSelectWindow = window.open(sUrl, '', 'height=500,width=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,left=400,top=50');
    }
    }
    </head><body>
    <form name="form1" method="post" action="">
      <input type="text" name="textfield">
      <a  target="_blank" onClick="SelectMenus(textField)">打开</a>
    </form>
    </body>
    </html>
    b.htm
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <%sMenuCode=Request("menuCodeOjb")%>
    <JAVASCRIPT language="javascript">
       function SetValue(parm1,parm2)
       {
        opener.document.all.<%sMenuCode%>.value = parm1;
        opener.document.all.<%sMenuCode%>.value = parm2;
       }
    </script>
    </head><body>
    <form name="form1" method="post" action="">
      <input type="checkbox" name="checkbox1" value="1">
      1
      <input type="checkbox" name="checkbox2" value="2"> 
      2
      <input type="button" name="Submit" value="提交" onClick="SetValue(1,2)">
    </form>
    </body>
    </html>
      

  3.   

    通过一个Input来过渡一下就行了。
      

  4.   

    提交的时候通过一个Text类型的Input来保存一下值就行了。