//得到地区码 function getAreaID(){ var area = 0; if($("#seachdistrict").val() != "0"){ area = $("#seachdistrict").val(); }else if ($("#seachcity").val() != "0"){ area = $("#seachcity").val(); }else{ area = $("#seachprov").val(); } return area; }
function showAreaID() { //地区码 var areaID = getAreaID(); //地区名 var areaName = getAreaNamebyID(areaID) ; alert("您选择的地区码:" + areaID + " 地区名:" + areaName); }