http://www.jq22.com/jquery-info8054
依赖jq
1 <li class="dz"><span class="name">地 址:</span> 2 <div class="areapick"> 3 <select class="pick"></select> 4 <select></select> 5 <select></select> 6 </div> 7 <div class="hideinputbox"> 8 <input type="hidden"> 9 <input type="hidden"> 10 <input type="hidden"> 11 </div> 12 </li>
3 <script src="scripts/Distpicker/distpicker.data.js"></script> 4 <script src="scripts/Distpicker/distpicker.js"></script> 5 <script type="text/javascript"> 6 $(function(){ 7 $('.areapick').distpicker();
//将选择的值传递到对应的input中,用于表单提交 8 $('.areapick select').change(function(event) { 9 $('.hideinputbox input').eq($(this).index()).val($(this).val()); 10 console.log($('.hideinputbox input').eq($(this).index()).val()); 11 }); 12 13 }) 14 </script>