标题:请高手帮忙分析下哪里错了 ,下边的下拉菜单就是获取不到上边的下拉菜单的值 ...
取消只看楼主
chthua
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2012-9-6
结帖率:100%
 问题点数:0 回复次数:1 
请高手帮忙分析下哪里错了 ,下边的下拉菜单就是获取不到上边的下拉菜单的值,谢谢啦
<!--#include file=../conn/conn1.asp -->

<% if request.cookies("okadmin")="" and request.cookies("rank")="" then
  response.redirect "login.asp"
end if %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.unnamed1 {
    font-size: 9pt;
}
-->
</style>
</head>

<body>


<div align="center">
  <p>
  <form name="myform" method="POST" action="tjnews_act.asp">
  
    <table width="529" height="331" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="77" colspan="2"><div align="center"><u><b><font size="4">
          添加客户详细信息</font></b></u></div></td>
      </tr>
   
     
      <tr>
        <td height="29" colspan="2"><span style="font-size: 9pt">主机型号:
     <%
sql="select * from building where cjyt='台式机主机' or cjyt='笔记本'"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
%>
        
        <select name="jqxh" onChange="changelocation(document.myform.jqxh.options[document.myform.jqxh.selectedIndex].value)" size="1">
          <option selected value="<%=trim(rs("name"))%>"><%=trim(rs("name"))%></option>
            <%

      seljqxh=rs("name")
         rs.movenext
      do while not rs.eof

%>
<option value="<%=trim(rs("name"))%>"><%=trim(rs("name"))%></option>

  <%
          rs.movenext
         loop

        rs.close
   %>               
 </select>
        
        </span></td>
      </tr>
      
      
      <tr>
        <td height="29" colspan="2"><span style="font-size: 9pt">主机编码:
               <select name="jqbm">
<option selected value="">请选择机器编码</option>
  
 <%
sql2="select * from building where  name='"&seljqxh&"' "
set rs2=server.createobject("ADODB.Recordset")
rs2.open sql2,conn,1,1
 if not(rs2.eof and rs2.bof) then
%>
<option value="<%=rs2("who")%>"><%=rs2("who")%></option>
<%
    do while not rs2.eof%>
<option value="<%=rs2("who")%>"><%=rs2("who")%></option>
 <%
        rs2.movenext
    loop
   end if
         rs2.close
   %>        
</select>
            
        </span></td>
      </tr>
   
   
      <tr>
        <td height="48" colspan="2" valign="bottom">
        <p align="center"><input type="submit" name="Submit" value="提 交">
           
          <input type="reset" name="Submit2" value="重 填"></td>
      </tr>
    </table>
    <p class="unnamed1"> </p>
  </form>
  </p>
</div>
</body>
</html>
搜索更多相关主题的帖子: 菜单 action include content 
2012-09-12 22:32
chthua
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2012-9-6
得分:0 
默认情况下 上边显示的下拉菜单的值 在下边下拉菜单的出来的正好对应,就是选择的时候不变化
2012-09-12 22:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-381285-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.208050 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved