
Код:
TextField.prototype.setCaretIndex = function(i)
{
Selection.setFocus(this);
if (this.type != "input") {
return;
}
if (i == undefined || i<0 || i>this.text.length || isNaN(i)) {
i = this.text.length;
}
Selection.setSelection(0, i);
this.replaceSel(this.text.slice(0, i));
};
use:my_textField.setCaretIndex(1);