先见图片
目的是点击上面的红框中交通方式,产生的二级联动对应的是后面车辆类型,
下方的红框中点击交通方式只对本框中车辆类型做更改,
目前是无论点击上方或下方方框中的交通方式,两个车辆类型都做更改,
其中上下两个下拉框的name和Id都是一样的名称。这样做便于ajax传递给后台存入数据库
各位,如何实现独立控制呢?谢谢。
------解决方案--------------------
由于代码长,分两端贴上
<%if not IN_FREECONTEX then Response.Write("Access Denied") : Response.End()%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Loading... - <%=SYSTEM_NAME%> - 控制台</title><%if 0 then%>
<link href="../../system/skins/default/skin.css" rel="stylesheet" type="text/css" /><%end if%>
<link href="<%=str_root_path&LOCAL_SKINSET%>skin.css" rel="stylesheet" type="text/css" />
<link href="<%=str_root_path&module_kernel("root")%>tools/calendar/calendar.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<%=str_root_path&module_kernel("root")%>scripts/lib.jquery.js"></script>
<script language="javascript" type="text/javascript" src="<%=str_root_path&module_kernel("root")%>scripts/lib.system.js"></script>
<script language="javascript" type="text/javascript" src="<%=str_root_path&module_kernel("root")%>scripts/navigation.js"></script>
<script language="javascript" type="text/javascript" src="scripts/ctr.traffic.js"></script>
<script language="javascript" type="text/javascript" src="<%=str_root_path&module_kernel("root")%>tools/calendar/calendar.js"></script>
</head>
<body class="stage">
<!--#include file="page.header.inc"-->
<table class="mtable center" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="L"> </td>
<td id="menus" class="C">
<!--#include file="page.menus.inc"-->
<%if not user_rights_check("traffic-edit") then'权限控制%>
<table class="ltable" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><span class="norights"><%=SYSTEM_NORIGHTS%></span></td>
</tr>
</table>
<%else'权限控制%>
<form id="form_traffic_add" name="form_traffic_add" method="post" action="#trafficadd" onsubmit="traffic_do('add');return false;">
<table class="ftable" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="15%">事故编号</th>
<td width="35%"><input name="AcM_AccidentNo" type="text" id="AcM_AccidentNo" size="30" maxlength="20" /></td>
<th width="15%">事故分类</th>
<td width="35%"><%call GetSelect ("4","","AcM_AccidentType")%></td>
</tr>
<tr>
<th>受案编号</th>
<td><input name="AcM_No" type="text" id="AcM_No" value="<%=AcM_No%>" size="30" maxlength="20" readonly="readonly" /></td>
<th> </th>
<td> </td>