Calling blur method using jquery

To call a function when a textbox loose focus we can use blur method. This method is called as soon as focus is lost.

<input type="text" id="txtName" />

<script type="text/javascript">
 $(function () {
     $("#txtName").blur(function () {
        alert("Blur method has been called");
     });
 });
   

</script>

Comments

Popular posts from this blog

Check if ViewBag is null or doesn't exist

Using Progress Bar In C#

Jquery serer side datatables in asp.net