易截截图软件、单文件、免安装、纯绿色、仅160KB

javascript 下拉框关联时的数组问题

在用javascript做客户端的,下拉框关联时,关联数据库的表超过三千条(行),就出现错误提示。
个人怀疑是数组长度的上限所至,请各位高手指教!
代码如下:
<script language = "JavaScript">
<%
'打开专业表,第二层
dim rs,sql,count,rs1,sql1
sql = "select * from district order by locationid asc"
set rs = conn.execute(sql)
%>
//第二层,数组表
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("districtname"))%>","<%= trim(rs("locationid"))%>","<%= trim(rs("districtid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=nothing
%>
onecount=<%=count%>;
//获得第二层选项
function changelocation(locationid)
{
document.myform.smalllocation.length = 0;
var locationid=locationid;
var i;
document.myform.smalllocation.options[0] = new Option('====所有地区====','0');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.smalllocation.options[document.myform.sm


相关问答:

新人javascript问题求助,请各位大哥大姐们来帮忙!

这是我的文本框
<input type="text" size="60" name="password_answer" id="pwdanswer" value="$!password_answer" >
提交按钮
<input clas ......

这段JavaScript代码为什么无法执行 - .NET技术 / C#

以下是一段JavsScript脚本,但运行时总会产生 “Microsoft JScript 运行时错误: 'null' 为空或不是对象”异常,大家帮看一下。 
<form id="form1" runat="server">
  < ......

ASP .NET后台文件写javascript代码

我有一段javascript代码,原本写在asp .net页面里,我想把它写入asp .net后台代码中。请问要怎么写?谢谢!
也就是说从aspx文件中,该为写入aspx.cs中,请给实例说明。

寫了之後你做什麼操作?

......

关于JAVASCRIPT 子窗体问题

有朋友可以帮下忙。想达到一个显示的效果。 得需要搜索什么资料。问题是这样的
有一个网页导航,鼠标点击以后页面不跳转,直接在页面里显示 导航的子菜单,然后鼠标放在子菜单的某个目录上,用AJAX弹出数据库的内容 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号