Home >Backend Development >PHP Tutorial >PHP+Mysql+Ajax+JS实现省市区三级联动_PHP

PHP+Mysql+Ajax+JS实现省市区三级联动_PHP

WBOY
WBOYOriginal
2016-06-01 11:54:31766browse

Ajax

基本思想就是:在JS动态创建select控件的option,通过Ajax获取在PHP从SQL数据库获取的省市区信息,代码有点长,但很多都是类似的,例如JS中省、市、区获取方法类似,PHP中通过参数不同执行不同的select语句。

index.html代码:

复制代码 代码如下:
BR>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


省市区三级联动



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn