开发者

how to apply javascript to selected text of a textarea?

I want to apply some changes to the selected text of a text area only.

I want to select a certain portion 开发者_如何学Cof a text written in the text area and want to make some changes on it by javascript.

Thanks


document.selection.createRange().text = "NEW TEXT";


I think the answer to this question might help you:

how-to-get-selected-text-from-textbox

It shows you selection of the text and you can use javascript to process it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜