读取二级下拉框

kingsjava kingsjava 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<script language="JavaScript">
var onecount; //定义onecount对像
onecount=0; //初始值为0
subcat=new Array(); //SUBCAT对像是一个新的数组
<%
int count=0;
ArrayList pro_lifts=main_Produmain.getSproduList();
int my_pro_lift_a=pro_lifts.size();
for(int i=0;i<my_pro_lift_a;i++)
{
Map my_rs2=(Map)pro_lifts.get(i);
%>
subcat[<%out.print(count);%>]=new Array('<%out.print(my_rs2.get("s_c_name"));%>','<%out.print(my_rs2.get("b_c_id"));%>','<%out.print(my_rs2.get("s_c_id"));%>');

<%
count=count+1;
}
%>
onecount=<%out.print(count);%>;

function changelocation(S_ID)
{
document.form1.smalllocation.length=0;
var S_ID=S_ID;
var i;
document.form1.smalllocation.options[0]=new Option('二类型','');
for (i=0;i<onecount;i++)
{
if (subcat[i][1]==S_ID)
{
document.form1.smalllocation.options[document.form1.smalllocation.length]=new Option(subcat[i][0],subcat[i][2]);
}
}
}

</script>

<select name="smalllocation" class="kk" onChange="changelocation2(document.form1.smalllocation.options[document.form1.smalllocation.selectedIndex].value)">


<option selected value="">二类型</option>



</select>
...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
kingsjava
Web 开发 81,108 成员 341,721 内容