逐字符更改字符串字符的颜色 [英] change the colour of a string character by character

查看:70
本文介绍了逐字符更改字符串字符的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本区域,其中有一些填充的字符串...用户可以在文本区域中插入数据..现在的要求是,新插入的新字符将具有不同的红色...如何实现通过JavaScript ??????用户不仅可以在字符串的末尾添加字符,而且可以在字符串的中间或开头添加字符.....当我尝试这样做时,它正在更改所有字符的所有颜色...

I have a text area with some aupopulated string in it...User can insert data in the text area..now the requirement is like that the new new inserted character would have different colour red...how to implement it by JavaScript?????? User can not only add character at the end of the string but also in middle or beginning of the string........when I am trying this it is changing all the colour of all the character .....

推荐答案

第一次补充,对不起,错误地发布了.

您需要使用RichTextControl ....或HTML编辑器...
first repply, sorry wrongly posted.

you need to use RichTextControl.... or using HTML Editor...


这篇关于逐字符更改字符串字符的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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