突出显示文本框中的文本 [英] Highlight text in textbox

查看:107
本文介绍了突出显示文本框中的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要突出显示文本框中的文本.当用户在文本框中键入任何内容时,应在文本框中的文本周围生成一个彩色框.我不确定是否可以在普通文本框中执行此操作,或者我必须为此使用富文本框.

我已经在yahoo邮件中看到了这件事.当我们尝试编写新邮件并在收件人"字段中添加收件人时,联系人姓名周围会出现一个框.

请提示..
谢谢

I want to highlight text in text box. When user types anything in textbox a colored box should generate around text in textbox. I am not sure if I can do this in normal textbox or I have to use Rich text box for this.

I have seen this thing in yahoo mail When we are trying to write new mail and we add recipients in "To" field, a box appears around contact name.

Kindly suggest..
Thank you

推荐答案

此处讨论了ASP.NET中可能关闭的所有内容,请查看所讨论的内容是否符合您的需求: ^ ]

如果上述讨论没有帮助,则您需要使用RichTextBox来获得所需的行为,因为普通文本框具有一定的局限性.
Whatever close possible in ASP.NET is discussed here, see if anything discussed is inline of what you need: Highlight text in Textbox using JavaScript[^]

If above discussion does not help then you need to use RichTextBox to get your desired behaviour as normal textbox has certain limitation.


这篇关于突出显示文本框中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆