实现区县和街道二级关联

var qxj = document.getElementById('map_qyssqx');

getStandCodeTableResult('qxdm','011',qxj,1);

if('${map.qyssqx}'!=''){

document.getElementById('map_qyssqx').value='${map.qyssqx}';

}

$("#map_qyssqx").on('change',function() {

findJdByQx($(this).val());

})

 function findJdByQx(qxId){

var sys = document.getElementById('map_qyssjd');

getStandCodeTableResult("jddm",qxId, sys,1);

}


页面代码

<view:qrytr>

   <view:qrytd width="15%" heightshow="true">所属区县:</view:qrytd>

   <view:qrytd width="35%" >

    <select id="map_qyssqx" name="map.qyssqx"/>

      </view:qrytd>

   <view:qrytd width="15%" heightshow="true">所属街道:</view:qrytd>

   <view:qrytd width="35%" >

  <select id="map_qyssjd" name="map.qyssjd"/>

    </view:qrytd>

    </view:qrytr>

梅花香自古寒来