地址三级联动
本帖最后由 李晋 于 2014-7-30 16:50 编辑view
<script src="<?php echo base_url(); ?>assets/js/area.js"></script>
<script src="http://cdn.staticfile.org/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript">
function database_init_area(){
var d_province = "";
var d_city = "";
for (i = 0; i < s.length - 1; i++) {
document.getElementById(s).onchange = new Function("change(" + (i + 1) + ")");
}
change(0);
$("#s_province").val(d_province);
change(1);
$("#s_city").val(d_city);
}
</script>
<!-- 新增收货地址 -->
<div id="new_add_shdz_contents" style="display:none;" class="shop_bd_shdz_new clearfix">
<div class="title">新增收货地址</div>
<div class="shdz_new_form">
<form action="#" method="post" id="applyform" >
<input type="hidden" name="user_id" value="<?php echo $user_id;?>">
<ul>
<li><label for=""><span>*</span>收货地区</label>
<select id="s_province" name="province"readonly></select>
<select id="s_city" name="city"readonly></select>
<select id="s_county" name="district" readonly></select>
<script type="text/javascript">database_init_area();</script>
</li>
<li><label for=""><span></span>邮政编码:</label><input type="text" class="youbian" name="zipcode"/></li>
<li><label for=""><span>*</span>详细地址:</label><input type="text" id="street" name="street" /></li>
<li><label for=""><span>*</span>收货人姓名:</label><input type="text" name="consignee" /></li>
<li><label for=""><span></span>电话:</label><input type="text" class="dianhua" name="telephone"/></li>
<li><label for=""><span></span>手机号:</label><input type="text" class="shouji" name="mobile"/></li>
<li><label for=""> </label><input type="button" value="增加收货地址" /></li>
</ul>
</from>
</div>
</div>
<!-- 新增收货地址 End -->
数据全不?
页:
[1]