document.getElementById('XXX').focus();
解决方案 »
- js 递归获取dom某节点的所有子节点
- 帮忙看一段js代码
- Ext 中 new Ext.DataView 问题
- JQ选择器中含有变量
- 正则表达式
- 求助document.getElementById("").innerHTML的问题
- innerHTML的问题
- 请问编写调试JavaScript用什么软件比较好?
- 怎样使用script语言使当前所有的超级连接失去焦点?--包括网页当中的框架!
- window.showModalDialog返回值是XML格式,如何用js获取兰花两字,格式如下
- Jquery不能设置cookie
- Uncaught NotFoundError: An attempt was made to reference a Node in a context whe
window.onload = function()
{
document.getElementById("id").focus();
}
用户名:<input name="name" ><br>
密码: <input name="password" type="password">
<input name="submit" type="submit" value="提交">
</form>
<script type="text/javascript">
window.onload = function()
{
document.getElementById("name").focus();
}
</script>