急急急!!初学者跪求? 代码如下:大侠们帮看一下,,,在线等!
要做一个四级联动,其中有一个为单选,其它的为下拉列表,
现在单选的onclick事件触发不了?
不知道什么地方出了问题!
高手们帮看一看,
我在这里先谢过了!
<!-- #include file="../DbLib/dbconectionIndex.asp"-->
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
<%
dim Commstr,record_count,i,j
function ChoiceArea(str)
sql="select Communist.AutoName from Communinlst,Auto where Communist.ID=Auto.BigClassID and Auto.Area='"&str&"'"
set rs=Server.CreateObject("ADODB.recordset")
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
Commstr=""
else
record_count=rs.recordcount
do while not rs.eof
if instr(Commstr,rs("AutoName"))=0 then
Commstr=Commstr & rs("AutoName") & ";"
rs.movenext
else
rs.movenext
end if
loop
end if
response.write Commstr
Comm_Array=split(Commstr,";")
j=ubound(Comm_Array)
call java_Comm_str(Comm_Array,j)
end function
%>
<script language=Javascript>
function java_Comm_str(searchfunction_vb,j){
document.myform.Communist.length=0
var i;
alert("searchfunction_vb")
document.myform.Communist.options[document.myform.Communist.length] = new Option("选择集团", 0);
for(i=0;i<=j;i++){
document.myform.communist.options[document.myform.communist.length] = new option(searchfunction_vb[i],i+1)
}
}
</script>
<form name="myform" action="aaa.asp" method="post">
<table width="183" height="153" border="0" cellpadding="0" cellspacing="1" bordercolor="#FF0000">
<tr>
<td height="37" colspan="2"><table width="181" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="63" height="35" bgcolor="#E0E0E0"><span class="style1">汽车产地:</span></td>
<td width="21"><input name="Area" type="radio" value="0" onclick="ChoiceArea(this.value)"></td>
<td width="32"><span class="style1">国产</span></td>
<td width="20"><input name="Area" type="radio" value="1" onclick="ChoiceArea(this.value)"></td>
<td width="45"><span class="style1">进口</span></td>
</tr>
</table></td>
</tr>
<tr>
<td width="62" bgcolor="#E0E0E0"><span class="style1">汽车集团:</span></td>
<td width="121"><select name="Communist" id="Communist" onChange="ChoiceCommunist(this.value)">
<option value="0" selected>选择集团</option>
</select></td>
</tr>
<tr>
<td bgcolor="#E0E0E0"><span class="style1">汽车品牌:</span></td>
<td><select name="Brand" id="Brand" onChange="ChoiceBrand(this.value)">
<option value="0" selected>选择品牌</option>
</select></td>
</tr>
<tr>
<td bgcolor="#E0E0E0"><span class="style1">汽车型号:</span></td>
<td bordercolor="#0000FF"><select name="ModelID" id="ModelID">
<option value="0" selected>选择型号</option>
</select></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="提交"></td>
<td><input type="reset" name="Submit" value="重置"></td>
</tr>
</table>
</form>
问题点数:68、回复次数:6Top
1 楼myvicy(我来也!)回复于 2005-04-01 15:58:37 得分 38
你帖出你在浏览器里生成的代码,这样大家也好调试,也好发现错误。你服务器端的代码大家怎么调试呢?Top
2 楼czq9966(宁录)(毛主席领导咱闹革命……)回复于 2005-04-01 16:04:28 得分 0
我做的都在一个页面里!
我把代码都放在这里了,现在如果没有错误的话,前两个联动应该可以实现了,
不过其中有错误!Top
3 楼czq9966(宁录)(毛主席领导咱闹革命……)回复于 2005-04-01 16:07:15 得分 0
现在就连onclick="ChoiceArea(this.value)" 也触发不了!Top
4 楼wxylvmnn(城隍庙三当家的)回复于 2005-04-01 16:13:49 得分 30
暈Top
5 楼wxylvmnn(城隍庙三当家的)回复于 2005-04-01 16:15:14 得分 0
大過節的,起來吧。代碼太長,麽心情看Top
6 楼czq9966(宁录)(毛主席领导咱闹革命……)回复于 2005-04-01 16:42:01 得分 0
楼上的兄弟,怎么能这样呢?Top




