jquery获取和设置textarea光标位置
var textarea=$("textarea[name=xxx]")
//获取光标位置
var index = textarea.prop("selectionStart");
//设置光标位置
textarea.prop("selectionStart", index);
textarea.prop("selectionEnd", index);
var textarea=$("textarea[name=xxx]")
//获取光标位置
var index = textarea.prop("selectionStart");
//设置光标位置
textarea.prop("selectionStart", index);
textarea.prop("selectionEnd", index);