<th scope="row"> 密码:<input id="txtUPwd" type="text" /></th>
</tr>
<tr>
<th scope="row">
<input id="Button1" type="button" value="登录" onclick="checkUser();" /></th>
就是执行Button1的事件
应该不难吧?
</tr>
<tr>
<th scope="row">
<input id="Button1" type="button" value="登录" onclick="checkUser();" /></th>
就是执行Button1的事件
应该不难吧?
解决方案 »
- Ext实现文件下载
- 怪问题:ActiveX 部件不能创建对象: 'Scripting.FileSystemObject'
- <span style="width:100px;overflow:hidden;text-overflow:ellipsis">中文测试好样的好样好样的</span>在不使用<nobr>的情况下,怎么使它
- AJAX应用中,怎么做后退
- 正则表达式全角空格的替换??求解?
- 关于登陆的时候验证的脚本问题
- 如何這樣設置表格高度?
- 请看http://www.far263.com/eoa/index.htm,关于框架网页适应不同大小窗口的问题
- 请问:在一个可编辑的ie的document 里(designMode=on),怎样预先设定输入文本的字体大小?100分必送!
- 求助,初学者
- 如何居中 li
- 悬浮div问题
</tr>
<tr>
<th scope="row">
<input id="Button1" type="button" value="登录" onclick="checkUser();" /></th>
js:
function abortClick()
{
document.documentElementById("Button1").click();
}
function tijiao(e)
{
var theEvent=windown.event||e;
var code=theEvent.keyCode||theEvent.which;
if(code==13)
{
document.getElementById("Button1").click();
return false;
}
}
<input id="txtUPwd" type="text" onkeydown="tijiao(event)" />
<head>
<script language="javascript" src="js/jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(
function()
{
$("#txt").keydown(
function(e)
{
if(e.keyCode==13)
{
#("#btn").click();
}
}
);
}
);
</script>
</head>
<body>
<input type="text" id="txt"></input>
<input type="submit" id="btn" onclick="javascript:alert('执行Button');"
</body>
</html>jquery下载地址:http://jquery.com/