开发者

Javascript Manual Selection doesn't replace

I have some text in a textbox. I automatically select some of it by calling textbox.setSelectionRange(a,开发者_如何学Go b). But then, when I start typing again, the letters are appended on the right of the selection instead of replacing the selected text. Is there any way I can make the selection 'replaceable' by the user?

edit: it seems that if you execute the function twice on the same piece of text, the text doesn't replace any more. So that's what happened

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜