Javascript examples for DOM HTML Element:Input Text
Hide label whenever something is typed in text box
<html> <head></head> <body> <span id="one">text</span> <input type="text" onkeypress="hide()"> <script> var isHidden = false;//ww w . j av a 2 s .co m function hide(){ if(!isHidden){ isHidden = true; document.getElementById("one").setAttribute("style","display:none"); } } </script> </body> </html>