首页 > 代码库 > 【修改】纯JS省市区三级联动 支持js默认省市区
【修改】纯JS省市区三级联动 支持js默认省市区
---恢复内容开始---
<!DOCTYPE html>
<html>
<head>
<title>修改,QQ JS省市区三级联动 -支持默认省市区</title>
<!-- 使用QQ的省市区数据 -->
<!--
<script type="text/javascript" src="http://ip.qq.com/js/geo.js"></script>
-->
<script type="text/javascript" src="http://www.mamicode.com/geo.js"></script>
</head>
<body onl oad="setup();preselect(‘河南省‘,‘新乡市‘,‘卫辉市‘);">
<form name="shareip" action="/cgi-bin/feedback" method="post">
<select class="select" name="province" id="s1">
<option></option>
</select>
<select class="select" name="city" id="s2">
<option></option>
</select>
<select class="select" name="town" id="s3">
<option></option>
</select>
<input id="address" name="address" type="hidden" value="" />
<input onclick="promptinfo();alert(document.getElementById(‘address‘).value); return false;" type="submit" value="http://www.mamicode.com/提交" />
</form>
<script>
function promptinfo()
{
var address = document.getElementById(‘address‘);
var s1 = document.getElementById(‘s1‘);
var s2 = document.getElementById(‘s2‘);
var s3 = document.getElementById(‘s3‘);
address.value = http://www.mamicode.com/s1.value + s2.value + >
}
</script>
</body>
</html>
---恢复内容结束---