表单自动获得焦点
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script>
window.onload = function(){
var txt = document.getElementById("txt");
txt.focus(); //自动获得焦点
}
</script>
</head>
<body>
自动获得焦点:
<input type="text" id="txt"/>
</body>
</html>
鼠标经过全选表单内容
ii.onmouseover=function () {
this.select();
}