<html> <head> <title> TEST </title> </head> <body> <script type="text/javascript"> function ma_fonction(x){ //console.log ("x ="+x); var elm =document.getElementById('monbouton'); if(x && x.length>0){ elm.disabled=false; }else{ elm.disabled=true; } } </script> <input type="text" id="moninput" onkeyup="ma_fonction(this.value);" value="" > <input type="button" id="monbouton" value="ok" disabled> </body> </html>
27 oct. 2014 à 02:51
Encore merci.