<script type="text/javascript">
cities = new Object();
value = new Object();
cities['48']=new Array('O2O', '商超', '电商', '餐饮');
value['48']=new Array('1', '2', '3', '4');
cities['67']=new Array('全部类型');
value['67']=new Array('b');
function set_city(supplier_id, type_list)
{
var pv, cv;
var i, ii;
pv=supplier_id.value;
cv=type_list.value;
type_list.length=1;
if(pv=='0') return;
if(typeof(cities[pv])=='undefined') return;
if(typeof(value[pv])=='undefined') return;
for(i=0; i<cities[pv].length; i++)
{
ii = i+1;
type_list.options[ii] = new Option();
type_list.options[ii].text = cities[pv][i];
type_list.options[ii].value = value[pv][i];
}
}
</script>
<form name="form1" action="" method="get">
<select name="province" onChange="s
二级联动菜单的实现----实现不同选项对应不同值
最新推荐文章于 2024-05-31 10:47:24 发布