Home > Articles > Javascript Articles > Begineers Guide :Simple Example to understand JavaScript Function onblur() and onfocus() in ASP.NET ...

Begineers Guide :Simple Example to understand JavaScript Function onblur() and onfocus() in ASP.NET C#

by Karthik Sachin   on Jul 25, 2016   Category: Javascript  | Level: Beginner  |  Views: 321    |  Points: 100   
Like this article? Bookmark and Share:
In this Article, I describe how to use the JavaScript function on blur() and on focus() in Asp.net C# application using a simple example

Here is the Explanation Step by Step:


Step 1

Just drag one simple textbox from toolbox and just add attributes like the below screen shot.

Step 2

Then as we know, just write the required functions inside the Script tag like below:



That's it, now this function will be triggered inthe  client side and you will get the Output like the below screen shot

Output 1

While Cursor is on the Bill no,



Note 

Changed to the Yellow Color since we have provided the color as "Yellow" in the myFocusFuction() in the above JavaScript code.

Output 2

Once it came out of the Bill No.



Note 

Back to the Normal Color since we didn't provide any color in the myBlurFuction() in the above JavaScript code.



Hope it was useful ,Kindly let me know your feedback or thoughts.

thanks
karthik


Like this article? Bookmark and Share:

Most viewed Articles

User Comments


No response found, be the first to review this article.

Submit feedback about this article

Please sign in to post feedback

Latest Posts