1.首先将Id为province的添加class=“province”便于针对city隐藏
2.$("#province").on("change", function(){
var index = document.getElementById("province").selectedIndex;
$(".city:not(.city2)").hide();
$(".city2 > option").eq(index).attr("selected",true);
});
selectedIndex即可获取选中的行数,根据行数联动city2即可。