[PHP] Checkbox alternado con un Select
Colapsar
X
-
Etiquetas: Ninguno
-
Aca tiene mi buen
Código:<html> <head> <script type="text/javascript"> function habilitaCombo() { // relojeo si ta checkeado if(document.getElementById("check1").checked==true){ document.getElementById("selectBox").disabled=true //deshabilito }else{ document.getElementById("selectBox").disabled=false //habilito } } </script> </head> <body> <form> <input type="checkbox" id="check1" onclick="habilitaCombo()" /> <select name="selectBox" id="selectBox"> <option value="21">argentinax</option> <option value="23">bolivia</option> <option value="21">katmandu</option> </select> </form> </body> </html> -
-
Aca tiene mi buen
Código:<html> <head> <script type="text/javascript"> function habilitaCombo() { // relojeo si ta checkeado if(document.getElementById("check1").checked==true){ document.getElementById("selectBox").disabled=true //deshabilito }else{ document.getElementById("selectBox").disabled=false //habilito } } </script> </head> <body> <form> <input type="checkbox" id="check1" onclick="habilitaCombo()" /> <select name="selectBox" id="selectBox"> <option value="21">argentinax</option> <option value="23">bolivia</option> <option value="21">katmandu</option> </select> </form> </body> </html>


Comentario



Comentario