<html>
<head>
<title>设置焦点</title>
<script language ="javascript">
function init(){
var ctrl=document.getElementById("UserName");
ctrl.focus();
}
</script>
</head>
<body onload="init()" >
<h1>设置焦点</h1>
姓名:<input type="text" id="UserName">
</body>
</html>
JS 设置焦点
最新推荐文章于 2022-06-15 18:53:36 发布