读取二级下拉框
<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>
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>
...全文
相关推荐
实现jsp页面二级下拉框联动,实时读取数据库数据
实现jsp页面二级下拉框联动,实时读取数据库数据实现jsp页面二级下拉框联动,实时读取数据库数据
JSP二级下拉框联动与数据库数据实时读取实现
JavaServer Pages(JSP)是一种用于开发动态Web页面的技术,它允许开发者将Java代码嵌入到HTML页面中。作为一种中间件解决方案,JSP通过提供一个标签库的方式,简化了页面内容的生成过程,使Java代码和HTML内容可以轻松地整合到一起。数据库结构设计是数据库应用开发的基础,良好的设计能够确保应用的数据完整性和高效访问。在本章节中,我们探讨了数据库表的设计原则、多表关系的建立以及JDBC连接数据库的原理和操作步骤。
在一个jsp页面实现二级下拉框联动,实时读取数据库数据.pdf
在一个jsp页面实现二级下拉框联动,实时读取数据库数据.pdf
AJAX二级下拉框联动
NULL 博文链接:https://justshare.iteye.com/blog/284928
ajax 实现二级下拉框,地址联动,serverlet,java,xmlHttp
ajax 二级下拉框ajax 实现二级下拉框,地址联动,xmlHttp,serverlet,java,ajax 实现二级下拉框,地址联动,xmlHttp,serverlet,java,


Web 开发
