Focus blur : Focus : Document JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Document » Focus »

 

Focus blur



    
<html>
<body>
<script language="JavaScript">
function function1(){
   document.getElementById("myButton").blur();
   document.getElementById("myButton").innerText = "This button lost its focus";
   alert("The button lost its focus")

</script>
<input id="myButton" 
       type="button" 
       onclick="function1();" 
       value="Tab to put in focus." onFocus="this.innerText='In focus. Click me to lose focus'">
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Document
» Focus