
08/12/2009, 09:12
|
 | | | Fecha de Ingreso: noviembre-2009 Ubicación: Buenos Aires, Argentina
Mensajes: 1.971
Antigüedad: 15 años, 4 meses Puntos: 65 | |
Respuesta: opciones del select Primero que esto esta mal... Si no tenes value que comparas??
<b>Profile</b>
<select name="profile" id="profile">
<option selected="">Select profile</option>
<option value="algo1">ADMINISTRATOR</option>
<option value="algo2">USER</option>
<option value="algo3">VISITOR</option>
</select>
y tu script (accionado al hacer submit)
function check(){
var select=document.getElementById("profile");
if(select.value.length==0){
alert("Seleccione Profile!");
return false;
}else{
return true;
}
} |