window.returnValue = dvalue;
window.top.hidePopWin(true);

解决方案 »

  1.   

    第二个页面
    <script language="javascript">
    function sendTo(dvalue) 

      if (!dvalue)
        {window.returnValue =""}
      else
        {window.returnValue = dvalue}
      window.close()

    </script>
    <button onclick="sendTo(document.form1.bz.value)" style="border:1px outset;font-size:12px">
    如果直接写成<button onclick="sendTo(11111111)" style="border:1px outset;font-size:12px">就可以
      

  2.   

    第一个页面:
    <script>
    function showcalendar(obj)
    {
      dv=window.showModalDialog("b.htm","44","center:1;help:no;status:no;dialogHeight:246px;dialogWidth:216px;scroll:no")
      if (dv) {if (dv=="null") obj.value='';else obj.value=dv;}
    }
    </script>
    <input type="text" onclick="showcalendar(this)" readonly style="cursor:hand">第二个页面<style type="text/css">
    body {
           background-color: #D4D0C8;
    }}
    </style><script language="javascript">
    //       Written by cloudchen, 2004/03/16function sendTo(dvalue) 

      if (!dvalue)
        {window.returnValue =""}
      else
        {window.returnValue = dvalue}
      window.close()

    </script>
    <html>
    <head>
    <title>添加日期</title>
    </head>
    <body>
    <div align=center>
    <table border="0" width="180">
    <tr><td>
    <fieldset class="c_fieldset"><legend class="c_legend"></legend>
    <!-- 控件 -->
    <form id="form1" name="form1" method="post" action="">
      <p>
        <label>
          <input type="radio" name="RadioGroup1" value="单选1" />
          单选1</label>
        <br />
        <label>
          <input type="radio" name="RadioGroup1" value="单选2" />
          单选2</label>
        <br />
      </p>
    </form>
    <!-- 控件 -->
    </fieldset>
    </td>
    </tr>
    <tr>
    <td align="right">
    <button onclick="sendTo(document.form1.RadioGroup1.value)" style="border:1px outset;font-size:12px">
    确定</button></td>
    </tr>
    </table>
    </div>
    </body>
    </html>如果<button onclick="sendTo(111111111)" style="border:1px outset;font-size:12px">
    就可以到第一个页面的<input里去 这里要怎么取单选组的值.
      

  3.   

    <script language="javascript">
    // Written by cloudchen, 2004/03/16
    function sendTo(obj){
    for(var i=0;i<obj.length;i++){
    if(obj[i].checked){
    window.returnValue = obj[i].value;
    //window.hidePopWin(true);
    //window.close();
    }
    }
    window.returnValue = "";

    </script>
    <html>
    <head>
    <title>添加日期</title>
    </head>
    </html>
    <div align=center>
    <table border="0" width="180">
    <tr><td>
    <fieldset class="c_fieldset"><legend class="c_legend">日期</legend>
    <!-- 调用日历 --><!-- 调用日历 --><form id="form1" name="form1" method="post" action="">
      <p>
        
          <input type="radio" name="bz" value="编制" />
          <label>编制</label>
        <br />
        
          <input type="radio" name="bz" value="下达" />
          <label>下达</label>
        <br />
        
          <input type="radio" name="bz" value="执行" />
          <label>执行</label>
        <br />
      </p>
    </form>
    </fieldset>
    </td>
    </tr>
    <tr>
    <td align="right">
    <button onclick="sendTo(document.form1.bz);" style="border:1px outset;font-size:12px">
    确定</button>
    &nbsp;</td>
    </tr>
    </table>
    </div>