<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
table{
width: 400px;
}
.biao{
width: 500px;
margin-top: 60px;
}
</style>
<script type="text/javascript" src="js/jquery-1.11.1.min.js" ></script>
<script>
$(function(){
var cities = [
["杭州市","绍兴市","温州市","义乌市","嘉兴市"],
["南京市","苏州市","扬州市","无锡市"],
["武汉市","襄阳市","荆州市","宜昌市","恩施市"],
["石家庄市","唐山市","保定市","邢台市","廊坊市"],
["长春市","吉林市","四平市","延边市"]];
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
table{
width: 400px;
}
.biao{
width: 500px;
margin-top: 60px;
}
</style>
<script type="text/javascript" src="js/jquery-1.11.1.min.js" ></script>
<script>
$(function(){
var cities = [
["杭州市","绍兴市","温州市","义乌市","嘉兴市"],
["南京市","苏州市","扬州市","无锡市"],
["武汉市","襄阳市","荆州市","宜昌市","恩施市"],
["石家庄市","唐山市","保定市","邢台市","廊坊市"],
["长春市","吉林市","四平市","延边市"]];
var $city = $("#city");
// 获得代表省份的下拉列表
$("#province").change(function() {
// alert(this.value);
// alert($(this).val());
$("#province").change(function() {
// alert(this.value);
// alert($(this).val());
// 清空第二个列表中的内容
$city.get(0).options.length = 0;
$city.get(0).options.length = 0;
var val = this.value;
//
//