← Desenvolvimento

Form drop-down menu

Lida 1769 vezes

Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

Form drop-down menu

Citar
<select size=\"1\" name=\"categoria\">
<option selected value=\"1\">Sites</option>
<option value=\"2\">Blogs</option>
<option value=\"3\">Fóruns</option>
</select><p>


Bem, eu tenho um formulário e esse formulario tem essa drop-down box...

A drop-down box tem as opções e dentro dessas opções eu queria por sub-opções...

Algo do género Site > informática etc...
Alguem sabe a melhor maneira de fazer isso?
Offline

Ricardo75 
Membro
Mensagens 1660 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

OPTGROUP (OPTION GROUP)

Código: [Seleccione]

<optgroup label="Porto">
<option>Porto</option>
<option>Gondomar</option>
<option>Matosinhos</option>
</optgroup>
<optgroup label="Aveiro">
<option>Ovar</option>
<option>Ílhavo</option>
<option>Aveiro</option>
</optgroup>


EDIT: Encontrei este exemplo: http://www.topxml.com/xhtml/xhtml_tag_optgroup.asp
Offline

Nelson 
Membro
Mensagens 6 Gostos 0
Troféus totais: 20
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 4 Level 3 Level 2 Level 1 First Post Karma Webmaster

o meu menu foi feito do firworks, facil e rapido