ASP联动菜单

来源:百度知道 编辑:UC知道 时间:2024/06/24 15:47:44
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<script language="javascript" src="js/class_jl.js"></script>
</head>
<body>

<form name="form1" method="post" action="?">
<%set tjrs=Conn.Execute("select tj from config where id in(1)")
tj=tjrs("tj")
for t=1 to tj+1

asp数据库版二级联动下拉菜单
<script language = "JavaScript">
subcat=new Array();
<%
Dim i
i=0
set rs2=server.createobject("adodb.recordset")
sqltext="select * from [shopxp_stype]"
rs2.open sqltext,conn,1,1
do while not rs2.eof
%>
subcat[<%=i%>]=new Array("<%=rs2("shopxpse_name")%>","<%=rs2("shopxpbe_id")%>","<%=rs2("shopxpse_id")%>");
<%
i=i+1
rs2.movenext
loop
rs2.close
%>

function changelocation(locationid)
...{
document.myform.shopxpse_id.length = 0;

var locationid=locationid;
var i;
for (i=0;i <subcat.length; i++)
...{
if (subcat[i][1] == locationid)