C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Use JavaScript Function on blur() and on focus() in ASP.NET
WhatsApp
Karthik Elumalai
4y
30.4
k
0
3
25
Blog
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.
JavaScript
ASP.NET
vaScript Function
Up Next
TextBox Validation Using JavaScript In ASP.NET In Real Time Scenario
Ebook Download
View all
Frontend Developer Interview Questions and Answers
Read by 1k people
Download Now!
Learn
View all
Membership not found