JavaScript onfocus event



JavaScript onfocus event



<!doctype html>
<html>
<head>
 <title> onmover </title>
 <style>
  #txt{
     height:40px;
background-color:#ccc;
width:400px;
border:solid 2px red;
font-size:30px;
  }
 </style>
</head>
<body>
   <script>
      function txtchage(){     
 
        document.getElementById("txt").style.background="blue";  
  
  }
   </script>
   
   <input type="text" onfocus="txtchage()" id="txt">

</body>
</html>
Post A Comment
  • Blogger Comment using Blogger
  • Facebook Comment using Facebook
  • Disqus Comment using Disqus

No comments :

Thanks For visiting Infotech Solutuion Blog