你是不是想要這種效果?
<html>
<body>
<select onchange="change(this.value)">
<option></option>
<option value="display_1">text</option>
<option value="display_2">select</option>
</select>
<input type=text name=display_1 style="display:none">
<select name=display_2 style="display:none">
<option></option>
</select>
</body>
</html>
<script>
function change(val){
with(document.all){
if(val=="display_1"){
display_1.style.display="block";
display_2.style.display="none";
}
if(val=="display_2"){
display_2.style.display="block";
display_1.style.display="none";
}
}
}
</script>

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>苏州东南区域管理中心车籍资料查询系统</title>
    <style type="text/css">
    <!--
    .tbale1 {
    font-family: "宋体";
    font-size: 10pt;
    border-bottom-width: 1px;
    border-top-style: none;
    border-bottom-color: #99CCCC;
    border-bottom-style: solid;
    background-color: #CAE7F7;
    }
    -->
    </style>
    <style type="text/css">
    <!--
    .table2 {
    font-family: "新宋体";
    font-size: 9pt;
    }
    .table1 {
    font-family: "新宋体";
    font-size: 12pt;
    background-color: #CAE7F7;
    color: #FF0000;
    border-top: none #CAE7F7;
    border-right: none #CAE7F7;
    border-bottom: none #CAE7F7;
    border-left: none #CAE7F7;
    }
    -->
    </style>
    </head><body background="img/bg.gif" topmargin="0" marginheight="0">
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <table width="100%" height="132" border="0" align="center">
      <tr> 
        <td height="46"> 
          <div align="center">
            <p  ><strong><font color="#FF0000">苏州东南区域管理中心车籍资料查询系统</font></strong></p>
          </div></td>
      </tr>
      <tr> 
        <td height="80"> 
          <div align="center">
            <form action="ckmain.asp" method="post" name="form2" target="mainFrame">
              <table width="770" border="0" align="center" cellpadding="0" cellspacing="0" class="table2">
                <tr bgcolor="#99CCFF" class="tbale1"> 
                  <td width="183" height="34" bgcolor="#CAE7F7" class="tbale1">&nbsp;</td>
                  <td width="317" align="center" valign="middle" bgcolor="#CAE7F7" class="tbale1">请选择查询条件 
                    <select name="fhd" id="select2" onchange="aa(this)">
                      <option value="1">显示全部</option>
                      <% if session("flag")=1 then%>
                      <option value="xsfgs">销售公司</option>
                      <% end if%>
                      <option value="fdjh">发动机号</option>
                      <option value="dph">底盘号</option>
                      <option value="cx">类型</option>
                      <option value="color">颜色</option>
                      <option value="lxdz">联系地址</option>
                      <option value="yb">邮编</option>
                      <option value="jcdata">交车日期</option>
                      <option value="bxdata">保险日期</option>
                      >
                      <option value="flag">地区</option>
                    </select></td>
                  <td width="69" bgcolor="#CAE7F7" class="tbale1"><input name="mohu" type="checkbox" id="mohu" value="1" checked>
                    模糊</td>
                  <td colspan="3" bgcolor="#CAE7F7" class="tbale1">排序方式 
                    <label> 
                    <input type="radio" name="px" value="1">
                    降序</label> <label> 
                    <input name="px" type="radio" value="2" checked>
                    升序</label></td>
                </tr>
                <tr bgcolor="#99CCFF" class="tbale1"> 
                  <td height="65" colspan="3" bgcolor="#CAE7F7" class="tbale1"> <label> 
                    </label> <label> </label> 
                    <div align="left"> 
                     
                        <input name="neirong" type="text" class="table1" id="neirong" style="display:none" value="请输入查询内容:">
                     
                        <select name="xsgs" id="select5"  style="display:none">
                          <option>==请选择销售公司==</option>
                          <option>常州销售分公司</option>
                          <option>无锡销售分公司</option>
                          <option>南通销售分公司</option>
                          <option>苏州销售分公司</option>
                        </select>
                        <select name="cx" id="select4"  style="display:none">
                          <option>==请选择车型==</option>
                          <option>得利卡</option>
                          <option>富利卡</option>
                          <option>凌帅</option>
                        </select>
                        <input name="ckmc" type="text" id="ckmc3" style="display:none">
                        <select name="color" id="color" style="display:none">
                          <option>==请选择颜色==</option>
                          <option>白色</option>
                          <option>蓝色</option>
                          <option>黑色</option>
                        </select>
                     
                    </div></td>
                  <td width="201" colspan="3" bgcolor="#CAE7F7" class="tbale1"> 
                      
                     </td>
                </tr>
                <tr bgcolor="#99CCFF" class="table1"> 
                  <td bgcolor="#CAE7F7" class="tbale1">注:<font color="#FF0000">日期格式<%= date%></font></td>
                  <td colspan="2" align="center" valign="middle" bgcolor="#CAE7F7" class="tbale1"> 
                    <input type="submit" name="Submit" value="开始查询"> &nbsp;&nbsp; 
                    <input type="reset" name="Submit2" value="重新选择"> <input name="go" type="hidden" id="go" value="1"></td>
                  <td align="center" valign="middle" bgcolor="#CAE7F7" class="tbale1"> 
                  </td>
                </tr>
              </table>
            </form>
          </div></td>
      </tr>
    </table>
    <script>
    function aa(oE)
    {
    var oA = document.all("xsgs");
    var oB = document.all("ckmc");
    var oC =document.all("cx");
    var oD =document.all("neirong")
    var oF =document.all("color")
    if(oE.options[oE.selectedIndex].text == '销售公司')
    {
    oA.style.display = "block";
    oB.style.display = "none";
    oC.style.display = "none";
    oD.style.display = "none";
    oF.style.display = "none";
    }
    else
    if(oE.options[oE.selectedIndex].text == '显示全部')

    {
    oA.style.display = "none";
    oB.style.display = "none";
    oC.style.display = "none";
    oD.style.display = "none";
    oF.style.display = "none";
    }
    else
    if (oE.options[oE.selectedIndex].text == '类型')
    {
    oA.style.display = "none";
    oB.style.display = "none";
    oC.style.display = "block";
    oD.style.display = "none";
    oF.style.display = "none";
    }

    else
    if (oE.options[oE.selectedIndex].text == '颜色')

    {
    oA.style.display = "none";
    oB.style.display = "none";
    oC.style.display = "none";
    oD.style.display = "none";
    oF.style.display = "block";
    }
    else
    {
    oA.style.display = "none";
    oB.style.display = "block";
    oC.style.display = "none";
    oD.style.display = "block";
    oF.style.display = "none";
    }
    }
    </script>
    </body>
    </html>
      

  2.   

    自动插入:存为html就可以了,数据你自己编写<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>苏州东南区域管理中心车籍资料查询系统</title>
    <script>
    var data = new Object();
    var id = 0;
    data['0=corp'] = new Object();
    data['0=corp']['11=haier'] = new Array('111=ele','222=tv','333=ra');
    data['0=corp']['12=toshiba'] = new Array('112=ele1','223=tv1','334=ra1');
    data['0=corp']['13=hitach'] = new Array('113=ele2','225=tv2','338=ra2');
    data['1=corp1'] = new Object();
    data['1=corp1']['111=haier1'] = new Array('111=ele','222=tv','333=ra');
    data['1=corp1']['121=toshiba1'] = new Array('112=ele1','223=tv1','334=ra1');
    data['1=corp1']['131=hitach1'] = new Array('113=ele2','225=tv2','338=ra2');
    data['2=corp2'] = new Object();
    data['2=corp2']['112=haier2'] = new Array('1111=ele111','22211=tv111','3335=ra253');
    data['2=corp2']['122=toshiba2'] = new Array('1121=ele1111','22311=tv222','3342=ra1345');
    data['2=corp2']['132=hitach2'] = new Array('1131=ele2111','225=tv2215','33812=ra2566');function GenList(s,f)
    {
    var st = eval(s);
    var sl;
    var tmp = new Array();
    f = f.substr(f.indexOf('_')+1,f.length);
    f = 'chiny_'+(++f);
    //alert(f);
    if (st)
    {
    if (!(sl = document.getElementById(f)))
    {
    sl = document.createElement("select");
    sl.id = 'chiny_'+(++id);
    document.body.insertBefore(sl);
    }
    sl.length = 0;
    sl.string = s;
    for (var k in st)
    {
    tmp = (k.indexOf('=') > 0 ? k : st[k]).split('=');
    sl[sl.length] = new Option(tmp[1],tmp[0]);
    } sl.onchange = cook;
    }
    else
    {
    alert(s);
    }

    }
    function cook()
    {
    GenList(this.string+"['"+this.value+"="+this.options[this.selectedIndex].text+"']",this.id);
    //alert(this.value);
    }</script>
    </head>
    <body onload="GenList('data','chiny_0')">
    </body>
    </html>