Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language="javascript" type="text/javascript"> function dropdownlist(listindex) { document.formname.inmob.options.length = 0; switch (listindex) { case "Inmobiliaria" : document.formname.inmob.options[0]=new Option("Select Sub-Category",""); document.formname.inmob.options[1]=new Option("Air-Conditioners/Coolers","Air-Conditioners/Coolers"); document.formname.inmob.options[2]=new Option("Audio/Video","Audio/Video"); document.formname.bb.options[3]=new Option("Beddings","Beddings"); document.formname.bb.options[4]=new Option("Camera","Camera"); document.formname.bb.options[5]=new Option("Cell Phones","Cell Phones"); break; } return true; } </script> <form id="formname" name="formname" method="post" action="submitform.asp" > <table width="50%" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="41%" align="right" valign="middle">Category :</td> <td width="59%" align="left" valign="middle"><select name="category" id="category" onchange="javascript: dropdownlist(this.options[this.selectedIndex].value);"> <option value="">Select Category</option> <option value="Inmobiliaria">Inmobiliaria</option> <option value="Constructora">Construstora</option> </select></td> </tr> <tr> <td align="right" valign="middle">Sub Category : </td> <td align="left" valign="middle"><select name="inmob"><option value="">Select Sub-Category</option></select> </td> </tr> <td align="left" valign="middle"><select name="bb"><option value="">Select Sub-Category</option></select> </td> </tr> </table> </form> </body> </html>