Js Range对象的setStart方法报错解决方法
The solution to the exception of the object of Class, Range, in Javascript
前几天在做用Js操纵光标选中一个单词时,发现了这一个问题,虽然技术很白菜,但是网上一搜还真找不到很好的解决办法,亲自打了一下,将其"解决",解决的方法可能不是最优的,望大家指正.
Several days before, while trying to use Javascript to operate the cursor to select a word, I found an exception. Although the expertise to be used is as easy as ABC, there are absolutely no good solutions found on the Internet. Therefore, I put it down to earth and got it "settled", in whose solution there might be something cumbersome I am waiting for every viewer to point out
条件:HTML5,原生Js,jQuery插件(jquery-1.8.3.js)
Circumstance:HTML5,original Js and jQuery plug-in(jquery-1.8.3.js)
要求:一个可编辑div中有一个多个单词hybrid,用Js操纵光标,选中最后一个hybrid.
Requirement: In a content-editable div in which there are m