Home > Web Front-end > HTML Tutorial > html drop-down form_html/css_WEB-ITnose

html drop-down form_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:12:38
Original
1189 people have browsed it

I want a drop-down form like this:
---parent1---
?son1
?son2
---parent2--
?son1
?son2
---parent3--
---parent4--
---parent5--
?son1
?son2

It can be seen that it is 2 layer effect.
Cannot be linked with 2 selects. This is what customers want.

How to write html. What should this data look like?


Reply to discussion (solution)

Can optgroup meet the needs?

<select>	<optgroup label="---parent1---">    	<option>?son1</option>        <option>?son2</option>    </optgroup>    <optgroup label="---parent2---">    	<option>?son1</option>        <option>?son2</option>    </optgroup></select>
Copy after login

Yes. Thank you. I haven't written a dropdown form like this before. Either one or linked. I really don’t know about optgroup.

Related labels:
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