防止密钥显示在ASP.Net中的文本框中 [英] Prevent Key from Displaying in Textbox in ASP.Net
本文介绍了防止密钥显示在ASP.Net中的文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何编写脚本以响应在文本框中按下的每个键,并防止在ASP.NET中的文本框中显示特定的键.
How to write script which respond on each key pressed for text box and prevent from displaying a particular key in Textbox in ASP.NET
推荐答案
KeyPress [
You can handle the KeyPress[^] event in JavaScript.
您需要使用JavaScript来解决这个问题.我通常会考虑使用jQuery简化此功能,然后您会像这样进行连接:
You need to use JavaScript to handle this. I would typically look at using jQuery to make this functionality a lot easier, then you would hook up like this:
(功能(){
(document).ready(function() {
这篇关于防止密钥显示在ASP.Net中的文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文