ASP代码无法传递的困扰...

来源:百度知道 编辑:UC知道 时间:2024/06/27 16:27:11
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shixian order by shixianorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%count = 0
do while not rs.eof %>
subcat[<%=count%>] = new Array("<%= trim(rs("shixianname"))%>","<%= rs("shiareaid")%>","<%= rs("shixianid")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.form1.shixianid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.shixianid.options[docume

你还差了一个changelocation1这个的函数

具体和changelocation这个是差不多的,但是里面的参数你最好不要定义一样

<% set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from table order by id asc",conn,1,1 '取出县
%>
<SCRIPT language = "JavaScript">
var onecount1;
onecount1=0;
subcat = new Array();
<%count1 = 0
do while not rs1.eof %>
subcat[<%=count1%>] = new Array("<%= trim(rs1("xxx"))%>","<%=cstr(rs1("xx"))%>","<%=cstr(rs1("x"))%>");<%count1 = count1 + 1
rs1.movenext
loop
rs1.close
%>
onecount1=<%=count1%>;

function changelocation1(locationid)
{
document.form1.cityzoneid.length = 0;

var locationid=locationid;
var i;
for (i=0;i < onecount1;