复制代码代码如下:
<body
<form action="" method="post" name="form1" >

<input type="text" id="id" />

</form>

</body>

<script> function myfocus() { document.getElementById(id).focus(); } </script>

HTML元素设置焦点的方法