The keyup event of the TextBox can be
handled by tracking the keyup event in jQuery as follows.
Syntax
$("#yourtextbox").keyup(function() {
…
});
Syntax
$("#yourtextbox").keyup(function() {
…
});
Example
//
// Textbox Event Handler - keyup Event
$('#txtEventHandler').keyup(function(event)
{
alert('Keyup
event fired for the key: ' + event.which);
alert('Textbox
Value: ' + $(this).val());
});
<asp:TextBox id="txtEventHandler" runat="server"></asp:TextBox></asp>
<asp:TextBox id="txtEventHandler" runat="server"></asp:TextBox></asp>
Notice that the keyup
event gives the exact value from the textbox, the keypress and keydown
events will delay fetching the value of textbox by the latest 1 character.
Related Posts
Asp.Net jQuery get Textbox Values
Asp.Net jQuery Textbox set ReadOnly
Asp.Net jQuery Textbox Remove ReadOnly
Asp.Net jQuery Textbox Disable
Asp.Net jQuery Textbox Enable
No comments:
Post a Comment