<input type="button" onclick="document.getElementById('tab2').getElementsByTagName('input')[0].focus()" value="ssss">
解决方案 »
- 使用jquery不能引入jquery.js文件,总是提醒$ is not defined,这是什么原因
- js脚本软件????
- 怎样在asp.net控件的事件中使用javascript方法
- Ext问题
- 这段JS验证为什么执行不了?????
- 关于日期大小比较的问题!
- 求救,关于事件冒泡的疑惑?
- 50分,两个frame分别有form1,当点击第一个form的submit时,我想把第一个form的内容拷贝到第二个上,我的写法那里错了?
- 询问怎样通过js增加和获得cookie
- net_lover怎么样才能做出一个美观实用的*.js
- javascript做的东西在firefox上没有效果
- 求一个联动2级菜单
var o=document.getElementsByTagName("input");
o(i).focus();
}_click(0);
<head>
<title> </title>
<script>
function i2Focus(){
document.getElementById("i2").focus();
}
</script>
</head>
<body>
<input type="text" id="i1">
<input type="text" id="i2">
<input type="button" id="b1" onClick="i2Focus()" value="点击">
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
</head>
<body><table id="tab1">
<tr> <td> <input type="text" > </td> </tr>
<tr> <td> <input type="text" > </td> </tr>
<tr> <td> <input type="text" > </td> </tr>
<tr> <td> <input type="text" > </td> </tr>
<tr> <td> <input type="text" > </td> </tr>
</table>
<table id="tab2">
<tr> <td> <input type="text" > </td> </tr>
<tr> <td> <input type="text" > </td> </tr>
<tr> <td> <input type="text" > </td> </tr>
<tr> <td> <input type="text" > </td> </tr>
<tr> <td> <input type="text" > </td> </tr>
</table>
<input type="button" onclick="getFocus()"> <script type="text/javascript">
function getFocus(){
document.getElementById('tab2').getElementsByTagName('input')[0].focus();
}
</script>
</body>
</html>