阅读背景:

如何在javascript中选择粗体/斜体/下划线的文本?

来源:互联网 

I'm trying to work on a webpage that allows users to write their own notes for a school project, and my idea was to let them bold/italicize/underline their text using buttons. As of now, the buttons are working, but they bold/italicize/underline everything inside the text area. Instead, I want it to work in such a way that only the text they highlight gets bold/italicized/underlined. I'd also like to know how to make it so that when they click the bold button, text that they type from then onwards will come out bold, and when they click it again, the text that is typed from then onwards will come out normal.I'm trying to work on a webpage that allows use




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: