<html>
<head>
</head>
<body>
<h1>Только для IE</h1>
<textarea id="textarea" rows="5" cols="20">123456789</textarea>
<div>Позиция курсора: <span id="position">undefined</span></div>
<script type="text/javascript">
var pos = document.getElementById("position");
document.getElementById("textarea").onkeyup = function () {
var range1 = document.selection.createRange();
var range2 = range1.duplicate();
range2.moveToElementText(this);
range2.setEndPoint("EndToStart", range1);
pos.innerHTML = range2.text.length;
};
</script>
</body>
</html>