<script language="javascript">
function gb(){
document.all("T1").focus();
var t=document.all("T1").createTextRange();
t.execCommand("selectall");
t.execCommand("cut");
t.execCommand("paste");
}
</script>
<body onload="gb()">
<input type="text" name="T1" size="20" value="aaaa">
</body>
function gb(){
document.all("T1").focus();
var t=document.all("T1").createTextRange();
t.execCommand("selectall");
t.execCommand("cut");
t.execCommand("paste");
}
</script>
<body onload="gb()">
<input type="text" name="T1" size="20" value="aaaa">
</body>
<form>
<input onfocus=set() value="baobao" name="textname">
</form>
<script>
function set(){
var rng=window.event.srcElement.createTextRange();
rng.collapse(false);
rng.select();
}
</script>
function gb(){
document.all("T1").focus();
var t=document.all("T1").createTextRange();
t.collapse(false);
t.select();
}
</script>
<body onload="gb()">
<input type="text" name="T1" size="20" value="aaaa">
</body>