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 happenedJavascript 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 o
0
0
0
精彩评论