Posted in

Agrupar opciones en un select

Para separar en un select las opciones por grupos usando el OPTGROUP.

<FORM action="http://algunsitio.com/prog/algunprograma" method="post">
 <P>
 <SELECT name="ComOS">
     <OPTION selected label="ninguno" value="ninguno">Ninguno</OPTION>
     <OPTGROUP label="PortMaster 3">
       <OPTION label="3.7.1" value="pm3_3.7.1">PortMaster 3 con ComOS 3.7.1</OPTION>
       <OPTION label="3.7" value="pm3_3.7">PortMaster 3 con ComOS 3.7</OPTION>
       <OPTION label="3.5" value="pm3_3.5">PortMaster 3 con ComOS 3.5</OPTION>
     </OPTGROUP>
     <OPTGROUP label="PortMaster 2">
       <OPTION label="3.7" value="pm2_3.7">PortMaster 2 con ComOS 3.7</OPTION>
       <OPTION label="3.5" value="pm2_3.5">PortMaster 2 con ComOS 3.5</OPTION>
     </OPTGROUP>
     <OPTGROUP label="IRX">
       <OPTION label="3.7R" value="IRX_3.7R">IRX con ComOS 3.7R</OPTION>
       <OPTION label="3.5R" value="IRX_3.5R">IRX con ComOS 3.5R</OPTION>
     </OPTGROUP>
 </SELECT>
</FORM>

Deixa un comentari

L'adreça electrònica no es publicarà. Els camps necessaris estan marcats amb *


The reCAPTCHA verification period has expired. Please reload the page.