阳光苗条

文章
4
资源
0
加入时间
4年1月22天

新浪微博中@功能的实现

实现该功能大致需要三步第一步:定位输入框中的光标的top和left属性                                      IE中很容易实现。直接调用document.selection.createRange()即可if (document.selection) {  elem.focus(); var Sel = document.selectio