document.getElementById('XXX').focus();
解决方案 »
- 如何处理$.getjson 返回值 为空的问题
- JS代码求解!!
- highstock插件问题
- 麻烦朋友们进来看看,谢谢了!
- 请教高手!走过路过的进来看看!
- javascript,一段字符串,把最後一個空格後面的所有字符提出來怎樣做?
- 如何禁用工具栏、地址栏等?
- 怎么样使得点击一下下拉菜单就提交表单啊?
- 如何判断一个元素是否支持某个属性??
- 如何用JAVASCRIPT或VBSCRIPT生成一个socket连接
- 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>