摘要:
在网上看了很多用js 将光标移动到textarea的最后,但是看了很多垃圾方法,屁不管用,浪费时间,最近用到一个新方法=IE支持document.selection=Firefox,Chrome,Safari以及Opera都有selectionStart和selectionEnd属性代码如下functioninsertText(obj,str){if(document.selection){varsel=document.selection.createRange();sel.text=str;}elseif(typeofobj.selectionStart==='number' 阅读全文