文本框的按键事件 [英] key press event of textbox
本文介绍了文本框的按键事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在asp.net中获得按键事件,就像在窗口应用程序中一样...请告诉我如何覆盖文本框属性?
i want to get key press event in asp.net as similar in window application...Pls tell how to override textbox properties??
推荐答案
请参考:
使用KeyPress的最新值 [ asp.net中TextBox的Keypress事件 [ ^ ]
ASP.NET TextBox KeyPress事件 [在ASP.NET中输入密钥-完整研究 [ Google [
Please refer:
Recent value with KeyPress[^]
Similar discussion:
Keypress Event of TextBox in asp.net[^]
ASP.NET TextBox KeyPress Event[^]
A good article:
Enter Key in ASP.NET - Complete Research[^]
And the best one: Google[^]
没有直接的方法不同于Click等其他事件.您可以使用Javascript来处理它,然后在JS函数内部,基本上在服务器上进行发布.请参考示例代码.
There''s no direct way of doing it, unlike the other events like Click. You can handle it though using Javascript, and then inside your JS function, you basically do a post on the server. Refer to the sample code.
function KeyPress()
{
//do post to server
}
<input type='text' onkeypress='return KeyPress()' />
这篇关于文本框的按键事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文