关于ASP三级联动的问题
<scriptlanguage="JavaScript">varonecount;varthreecount;onecount=0;threecount=0subcat3...
<script language = "JavaScript">
var onecount;
var threecount;
onecount=0;
threecount=0
subcat3=new Array();
subcat3[0] = new Array("111","582","642");
subcat3[1] = new Array("1111","578","614");
threecount=2;
subcat = new Array();
subcat[0] = new Array("","0","610");
subcat[1] = new Array("助油","58","584");
subcat[2] = new Array("项链","56","576");
onecount=3;
function changelocation(locationid)
{
document.myform.shopxpse_id.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.shopxpse_id.options[document.myform.shopxpse_id.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)
}
function changelocation3(locationid)
{
document.myform.xclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < threecount; i++)
{
if (subcat3[i][1] == locationid)
{
document.myform.xclassid.options[document.myform.xclassid.length] = new Option(subcat3[i][0], subcat3[i][2]);
}
}
}
//-->
</script>
<body>
<form name="myform" method="post" action="sshopxpaddpt.asp?action=add" OnSubmit="return checkkk()" >
<table width="96%" border="0" cellpadding="0" cellspacing="5" bgcolor="#F1F3F5">
<tr >
<td width="23%" align="right">选择商品的分类:</td>
<td width="77%">
大类:
<select name="shopxpbe_id" size="1" id="shopxpbe_id" onChange="changelocation(document.myform.shopxpbe_id.options[document.myform.shopxpbe_id.selectedIndex].value)">
<option value="64">系统配件</option>
<option value="63">机身配件</option>
<option value="71">电子电器</option>
<option value="56">功能附件</option>
<option value="55">排屑器</option>
<option value="57">油冷机</option>
<option value="80">光栅尺</option>
<option value="82">第四轴</option>
<option value="58">刀库</option>
<option value="81">更多/其它商品</option>
</select>
小类:
<select name="shopxpse_id" size="1" id="shopxpse_id" onChange="changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)">
<option value="568">主轴</option>
<option value="569">丝杆</option>
</select>
三级分类:
<select name="xclassid">
暂时没有子分类
</td>
</tr>
二级分类怎么无法联动啊?在线求 展开
var onecount;
var threecount;
onecount=0;
threecount=0
subcat3=new Array();
subcat3[0] = new Array("111","582","642");
subcat3[1] = new Array("1111","578","614");
threecount=2;
subcat = new Array();
subcat[0] = new Array("","0","610");
subcat[1] = new Array("助油","58","584");
subcat[2] = new Array("项链","56","576");
onecount=3;
function changelocation(locationid)
{
document.myform.shopxpse_id.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.shopxpse_id.options[document.myform.shopxpse_id.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)
}
function changelocation3(locationid)
{
document.myform.xclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < threecount; i++)
{
if (subcat3[i][1] == locationid)
{
document.myform.xclassid.options[document.myform.xclassid.length] = new Option(subcat3[i][0], subcat3[i][2]);
}
}
}
//-->
</script>
<body>
<form name="myform" method="post" action="sshopxpaddpt.asp?action=add" OnSubmit="return checkkk()" >
<table width="96%" border="0" cellpadding="0" cellspacing="5" bgcolor="#F1F3F5">
<tr >
<td width="23%" align="right">选择商品的分类:</td>
<td width="77%">
大类:
<select name="shopxpbe_id" size="1" id="shopxpbe_id" onChange="changelocation(document.myform.shopxpbe_id.options[document.myform.shopxpbe_id.selectedIndex].value)">
<option value="64">系统配件</option>
<option value="63">机身配件</option>
<option value="71">电子电器</option>
<option value="56">功能附件</option>
<option value="55">排屑器</option>
<option value="57">油冷机</option>
<option value="80">光栅尺</option>
<option value="82">第四轴</option>
<option value="58">刀库</option>
<option value="81">更多/其它商品</option>
</select>
小类:
<select name="shopxpse_id" size="1" id="shopxpse_id" onChange="changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)">
<option value="568">主轴</option>
<option value="569">丝杆</option>
</select>
三级分类:
<select name="xclassid">
暂时没有子分类
</td>
</tr>
二级分类怎么无法联动啊?在线求 展开
展开全部
<script language = "JavaScript">
var onecount;
var threecount;
onecount=0;
threecount=0
subcat3=new Array();
subcat3[0] = new Array("111","582","642");
subcat3[1] = new Array("1111","578","614");
threecount=2;
subcat = new Array();
subcat[0] = new Array("","0","610");
subcat[1] = new Array("助油","58","584");
subcat[2] = new Array("项链","56","576");
onecount=3;
function changelocation(locationid)
{
document.myform.shopxpse_id.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.shopxpse_id.options[document.myform.shopxpse_id.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)
}
function changelocation3(locationid)
{
document.myform.xclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < threecount; i++)
{
if (subcat3[i][1] == locationid)
{
document.myform.xclassid.options[document.myform.xclassid.length] = new Option(subcat3[i][0], subcat3[i][2]);
}
}
}
//-->
</script>
<body>
<form name="myform" method="post" action="sshopxpaddpt.asp?action=add" OnSubmit="return checkkk()" >
<table width="96%" border="0" cellpadding="0" cellspacing="5" bgcolor="#F1F3F5">
<tr >
<td width="23%" align="right">选择商品的分类:</td>
<td width="77%">
大类:
<select name="shopxpbe_id" size="1" id="shopxpbe_id" onChange="changelocation(document.myform.shopxpbe_id.options[document.myform.shopxpbe_id.selectedIndex].value)">
<option value="64">系统配件</option>
<option value="63">机身配件</option>
<option value="71">电子电器</option>
<option value="56">功能附件</option>
<option value="55">排屑器</option>
<option value="57">油冷机</option>
<option value="80">光栅尺</option>
<option value="82">第四轴</option>
<option value="58">刀库</option>
<option value="81">更多/其它商品</option>
</select>
小类:
<select name="shopxpse_id" size="1" id="shopxpse_id" onChange="changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)">
<option value="568">主轴</option>
<option value="569">丝杆</option>
</select>
三级分类:
<select name="xclassid">
<option>暂时没有分类</option>
<option value="584">主轴</option>
</select>
</td>
</tr> </table>
可以联动啊, 可HI上联系我
var onecount;
var threecount;
onecount=0;
threecount=0
subcat3=new Array();
subcat3[0] = new Array("111","582","642");
subcat3[1] = new Array("1111","578","614");
threecount=2;
subcat = new Array();
subcat[0] = new Array("","0","610");
subcat[1] = new Array("助油","58","584");
subcat[2] = new Array("项链","56","576");
onecount=3;
function changelocation(locationid)
{
document.myform.shopxpse_id.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.shopxpse_id.options[document.myform.shopxpse_id.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)
}
function changelocation3(locationid)
{
document.myform.xclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < threecount; i++)
{
if (subcat3[i][1] == locationid)
{
document.myform.xclassid.options[document.myform.xclassid.length] = new Option(subcat3[i][0], subcat3[i][2]);
}
}
}
//-->
</script>
<body>
<form name="myform" method="post" action="sshopxpaddpt.asp?action=add" OnSubmit="return checkkk()" >
<table width="96%" border="0" cellpadding="0" cellspacing="5" bgcolor="#F1F3F5">
<tr >
<td width="23%" align="right">选择商品的分类:</td>
<td width="77%">
大类:
<select name="shopxpbe_id" size="1" id="shopxpbe_id" onChange="changelocation(document.myform.shopxpbe_id.options[document.myform.shopxpbe_id.selectedIndex].value)">
<option value="64">系统配件</option>
<option value="63">机身配件</option>
<option value="71">电子电器</option>
<option value="56">功能附件</option>
<option value="55">排屑器</option>
<option value="57">油冷机</option>
<option value="80">光栅尺</option>
<option value="82">第四轴</option>
<option value="58">刀库</option>
<option value="81">更多/其它商品</option>
</select>
小类:
<select name="shopxpse_id" size="1" id="shopxpse_id" onChange="changelocation3(document.myform.shopxpse_id.options[document.myform.shopxpse_id.selectedIndex].value)">
<option value="568">主轴</option>
<option value="569">丝杆</option>
</select>
三级分类:
<select name="xclassid">
<option>暂时没有分类</option>
<option value="584">主轴</option>
</select>
</td>
</tr> </table>
可以联动啊, 可HI上联系我
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
Storm代理
2023-07-25 广告
2023-07-25 广告
StormProxies是一家提供动态代理服务器服务的企业,旨在帮助用户更好地管理网络访问和安全。以下是一些关于StormProxies的IP动态代理服务的特点:1. 高匿名性:StormProxies的动态代理服务器具有高匿名性,可以有效...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询