Home > php教程 > php手册 > 用php+javascript实现二级级联菜单的制作

用php+javascript实现二级级联菜单的制作

WBOY
Release: 2016-06-13 12:28:47
Original
837 people have browsed it

 

大体思路是这样的:为了不让先前的页面刷新,我用iframe潜入了一个二级子页面,用来读取数据库中的数据,最后把想要的数据传递给父级页面,完成数据的选择和转移。

主要程序代码如下(部分代码有改动,但不影响功能):
父页面reg.html:

 

子页面city.php:

<script> <BR>function goto(n){ <BR>this.location.href=”city.php?sh_id=”+n; <BR>} <BR></script>




source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template