<form name='search1' method='post' action=''>
  <select name="d1_id" class="bbssel" onChange="search1.submit();">

解决方案 »

  1.   

    <form name='search1' id='search1' method='post' action='input.asp' target='_self'>
      <select name="d1_id" class="bbssel" onChange='javascript:document.getElementById("search1").submit();'>
      

  2.   

    ok,我把全部的代码提交出来看看有没有什么问题
    <!--#include file="conn.asp"-->
    <%
    Dim f_id
    Set Rs = Server.CreateObject("ADODB.Recordset")
    if not Request("d1_id")=null then f_id=Cint(Request("d1_id"))
    response.write f_id
    %>
    <html>
    <head>
    <meta http-equiv=Content-Type content="text/html; charset=gb2312">
    <title>输入页面</title>
    <LINK href="css/common2.css" type="text/css" rel="stylesheet">
    </head>
    <body>
    <table width="70%" border="0">
      <!--三维-->
      <tr> 
        <td>&nbsp;</td>
        <td>
         <form name="d3" method="post">
         <input type="hidden" name="dimension" value="2">
         <table width="100%" border="0" cellspacing="2" cellpadding="2">
            <tr> 
              <td colspan="2" align="right" id=bbsleft><div id="title" align="center">增加第二维数据</div></td>
            </tr>
            <tr> 
              <td width="15%" align="right"><div id="normal">名称:</div></td>
              <td width="85%">
               <input type="text" name="d3_name" size="25" class="bbssel">
              </td>
            </tr>
            <tr> 
              <td width="15%" align="right">内容:</td>
              <td width="85%">
               <input type="text" name="d3_content" size="25" class="bbssel">
              </td>
            </tr>
            <tr> 
              <td width="15%" align="right">一维联系:</td>
              <td width="85%">
               <form id='search1' name='search1' method='post' action='input.asp' target='_self'>
               <select name="d1_id" class="bbssel" onChange='javascript:search1.submit();'>
               <option value="0" selected>无选择</option>
               <%           
               sqlStr = "SELECT * FROM first_dimension ORDER BY first_id"
    Rs.open sqlStr,conn,1,3
    DO While not Rs.eof
    d1_combox_str = d1_combox_str & "<option value='" & Rs("first_id") & "'>"
    d1_combox_str = d1_combox_str & Rs("first_name") 
    d1_combox_str = d1_combox_str & "</option>"
    Rs.movenext
    Loop
    Rs.close
               Response.write d1_combox_str
               %>
               </select>
               </form>
              </td>
            </tr>
            <tr> 
              <td width="15%" align="right">二维联系:</td>
              <td width="85%">
               <select name="d2_id" class="bbssel">
               <option value="0" selected>无选择</option>
               <%
               if f_id>0 then
               sqlStr = "SELECT * FROM second_dimension WHERE first_id = " & CStr(f_id) & " ORDER BY first_id,second_id"
               else
               sqlStr = "SELECT * FROM second_dimension ORDER BY first_id,second_id"
               end if
    Rs.open sqlStr,conn,1,3
    DO While not Rs.eof
    d2_combox_str = d2_combox_str & "<option value='" & Rs("second_id") & "'>"
    d2_combox_str = d2_combox_str & Rs("second_name") 
    d2_combox_str = d2_combox_str & "</option>"
    Rs.movenext
    Loop
    Rs.close
               Response.write d2_combox_str
               %>
               </select>
              </td>
            </tr>
            <tr> 
              <td>&nbsp;</td>
              <td>
               <input type="radio" name="chooseType" value="1" checked>一维基准
               &nbsp;&nbsp;
               <input type="radio" name="chooseType" value="2">二维基准
              </td>
            </tr>
            <tr> 
              <td>&nbsp;</td>
              <td>
               <input type="button" name="submit" value="提交" class="bbsselb">
               &nbsp;&nbsp;&nbsp;&nbsp;
               <input type="reset" name="reset" value="重置" class="bbsselb">
              </td>
            </tr>
          </table>
          </form>
        </td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>
      

  3.   

    <!--#include file="conn.asp"-->
    <%
    Dim f_id
    Set Rs = Server.CreateObject("ADODB.Recordset")
    if not Request("d1_id")=null then f_id=Cint(Request("d1_id"))
    response.write f_id
    %>
    <html>
    <head>
    <meta http-equiv=Content-Type content="text/html; charset=gb2312">
    <title>输入页面</title>
    <LINK href="css/common2.css" type="text/css" rel="stylesheet">
    </head>
    <body>
    <table width="70%" border="0">
      <!--三维-->
      <tr> 
        <td>&nbsp;</td>
        <td>
    <form id='search1' name='search1' method='post' action='input.asp' target='_self'>
    <input type="hidden" name="d1_id">
    </form>
         <form name="d3" method="post">
         <input type="hidden" name="dimension" value="2">
         <table width="100%" border="0" cellspacing="2" cellpadding="2">
            <tr> 
              <td colspan="2" align="right" id=bbsleft><div id="title" align="center">增加第二维数据</div></td>
            </tr>
            <tr> 
              <td width="15%" align="right"><div id="normal">名称:</div></td>
              <td width="85%">
               <input type="text" name="d3_name" size="25" class="bbssel">
              </td>
            </tr>
            <tr> 
              <td width="15%" align="right">内容:</td>
              <td width="85%">
               <input type="text" name="d3_content" size="25" class="bbssel">
              </td>
            </tr>
            <tr> 
              <td width="15%" align="right">一维联系:</td>
              <td width="85%">
               <select name="d1_id" class="bbssel" onChange='search1.d1_id.value=this.value;search1.submit();'>
               <option value="0" selected>无选择</option>
               <%           
               sqlStr = "SELECT * FROM first_dimension ORDER BY first_id"
    Rs.open sqlStr,conn,1,3
    DO While not Rs.eof
    d1_combox_str = d1_combox_str & "<option value='" & Rs("first_id") & "'>"
    d1_combox_str = d1_combox_str & Rs("first_name") 
    d1_combox_str = d1_combox_str & "</option>"
    Rs.movenext
    Loop
    Rs.close
               Response.write d1_combox_str
               %>
               </select>
              
              </td>
            </tr>
            <tr> 
              <td width="15%" align="right">二维联系:</td>
              <td width="85%">
               <select name="d2_id" class="bbssel">
               <option value="0" selected>无选择</option>
               <%
               if f_id>0 then
               sqlStr = "SELECT * FROM second_dimension WHERE first_id = " & CStr(f_id) & " ORDER BY first_id,second_id"
               else
               sqlStr = "SELECT * FROM second_dimension ORDER BY first_id,second_id"
               end if
    Rs.open sqlStr,conn,1,3
    DO While not Rs.eof
    d2_combox_str = d2_combox_str & "<option value='" & Rs("second_id") & "'>"
    d2_combox_str = d2_combox_str & Rs("second_name") 
    d2_combox_str = d2_combox_str & "</option>"
    Rs.movenext
    Loop
    Rs.close
               Response.write d2_combox_str
               %>
               </select>
              </td>
            </tr>
            <tr> 
              <td>&nbsp;</td>
              <td>
               <input type="radio" name="chooseType" value="1" checked>一维基准
               &nbsp;&nbsp;
               <input type="radio" name="chooseType" value="2">二维基准
              </td>
            </tr>
            <tr> 
              <td>&nbsp;</td>
              <td>
               <input type="button" name="submit" value="提交" class="bbsselb">
               &nbsp;&nbsp;&nbsp;&nbsp;
               <input type="reset" name="reset" value="重置" class="bbsselb">
              </td>
            </tr>
          </table>
          </form>
        </td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>