The
keypress event of a TextBox can be handled by tracking the keypress event in
jQuery as follows.
Syntax
$("#yourtextbox").keypress(function() {
…
});
Example
Syntax
$("#yourtextbox").keypress(function() {
…
});
Example
//
// Textbox Event Handler - keypress Event
$('#txtEventHandler').keypress(function(event) {
alert('Keypress
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>
No comments:
Post a Comment