This can be achieved by using this.focus(); directly in Firefox.
In IE, after assigning the value of the text box to the text box after this.focus();, the focus will be at the end. Very simple! !
like:
Copy the code code as follows:
var tar=document.getElementByIdx_x("name");
if(tar.attachEvent){
tar.attachEvent('onmouseover',focus(tar),false);
}else{
tar.addEventListener('mouseover',focus(tar),false);
}
function focus(tar){
tar.focus();
tar.value=tar.value;
}