我正在尝试在此链接上进行简单的使用
http://www.appelsiini.net/projects/chained
但第二个下拉菜单仍然显示所有选项。这是我的代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script language="JavaScript" type="text/javascript" src="jquery.js"></script>
<script language="JavaScript" type="text/javascript" src="jquery.chained.js" charset="utf-8"></script>
<script>
if (jQuery().chained) {
alert('jQuery is loaded!');
}
else{
alert('jQuery is not loaded!');
}
</script>
<select id="mark" name="mark">
<option value="">--</option>
<option value="bmw">BMW</option>
<option value="audi">Audi</option>
</select>
<select id="series" name="series">
<option value="">--</option>
<option value="series-3" class="bmw">3 series</option>
<option value="series-5" class="bmw">5 series</option>
<option value="series-6" class="bmw">6 series</option>
<option value="a3" class="audi">A3</option>
<option value="a4" class="audi">A4</option>
<option value="a5" class="audi">A5</option>
</select>
<script language="JavaScript" type="text/javascript">
$("#series").chained("#mark");
</script>
</html>