.NET Daily

JavaScript events applied on a TextBox control

Introduction

Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.


LATEST POSTS

How to solve: An expression tree may not contain a dynamic operation – ASP.NET Core 06th July, 2019

How to use DbContext Scaffold to add only selected tables – ASP.NET Core 01st July, 2019

Javascript

JavaScript events applied on a TextBox control

Posted on .

If you encountered before a scenario when you had to make an auto-complete TextBox or to throw certain client-side events based on the actions that user is making on the control and didn’t knew what events to use, here is a list with them along with a short description:

(Having in consideration that a TextBox control generates in HTML a <input type=”text”/> tag, almost all Javascript client-side events are specific to the text input tag.)

  • OnBlur – occurs when TextBox control loses focus;
  • OnChange – occurs when text in the TextBox control is changed;
  • OnFocus – occurs when TextBox control gain focus;
  • OnKeyDown – occurs when you press a keyboard key in the TextBox control;
  • OnKeyPressed – occurs when you press or hold down a keyboard key in the TextBox control;
  • OnKeyUp – occurs when you release the keyboard key pressed before in the TextBox control;
  • OnClick – occurs when you click on the TextBox control;
Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.

There are no comments.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

View Comments (0) ...
Navigation