asp三级连动菜单的问题
functionchangelocation(locationid){document.form.smalllocation.length=0;document.form...
function changelocation(locationid)
{
document.form.smalllocation.length = 0;
document.form.dlmc0.length = 0;
document.form.dlmc0.options[0] = new Option('==请选择小分类==','');
var locationid=locationid;
var i;
document.form.smalllocation.options[0] = new Option('==请选择大分类==','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form.smalllocation.options[document.form.smalllocation.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
这个里面的document.form.smalllocation.length这句话,不懂是什么意思,不是应该用循环吗,document.form.smalllocation.length值不就固定了,在重复覆盖吗。 展开
{
document.form.smalllocation.length = 0;
document.form.dlmc0.length = 0;
document.form.dlmc0.options[0] = new Option('==请选择小分类==','');
var locationid=locationid;
var i;
document.form.smalllocation.options[0] = new Option('==请选择大分类==','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form.smalllocation.options[document.form.smalllocation.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
这个里面的document.form.smalllocation.length这句话,不懂是什么意思,不是应该用循环吗,document.form.smalllocation.length值不就固定了,在重复覆盖吗。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询