在IE中可以使用TextRange 的offsetTop和offsetLeft属性获取光标的坐标
var txtR = $("textarea").createTextRange();
txtR.moveStart("character", starti);
txtR.moveEnd("character", starti);
txtR.select();txtR.offsetTop 
txtR.offsetLeft但在firefox中不支持createTextRange()
不知道有没有其他方法可以获取
谢谢