-1

here is my code:

<select id="List" name="UserType" onChange ="hide">
       <option value="0" disabled="disabled" selected="selected">Tipo de Usuario</option>
       <option value="1" onclick="hide">Administrador</option>
       <option value="2" onclick="hide">Moderador</option>
       <option value="3" onclick="hide">Usuario Comun</option>
</select>

when i click some value (not zero) in the the drop down, i need remove the first item from this (Tipo de Usuario). Some code in javascript able to do that?

Marco Altieri
  • 3,726
  • 2
  • 33
  • 47
StAx
  • 272
  • 1
  • 3
  • 16

2 Answers2

0

you can always use this:

<option disabled selected style="display:none">Tipo de usuaro</option>
MorKadosh
  • 5,846
  • 3
  • 25
  • 37
0
function hide(){
    var list = document.getElementById("List");
    list.removeChild(list.childNodes[1]);
}
Vivek
  • 38
  • 4