Home > Web Front-end > HTML Tutorial > Newbie asking about dynamic changes of html form elements_html/css_WEB-ITnose

Newbie asking about dynamic changes of html form elements_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:16:50
Original
937 people have browsed it

[b]For example, the option content of one drop-down menu changes with the content of another drop-down menu. For example, the first drop-down selects the school, and the second drop-down selects the campus. Different schools have different campuses, so the second drop-down needs to change as the first changes.


Reply to discussion (solution)

Bind an action in the first drop-down box, onchange="change()", and get the corresponding in the bound change function Select the selected content of the drop-down box, and then operate the corresponding control that needs to be changed.

Drop-down menu linkage requires JS. Consider using ajax technology.

The pure JS implementation code may be a little more, but if you use a framework, there are ready-made things that can be applied

http://www.jb51.net/article/9790.htm

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template