标签:
<form action="checkLogin.do" class="login-form" method="post" id="OIform" onSubmit="return false;">
<input type="text" name="notautosubmit" style="display:none"/>
<h3 class="form-title" data-i18n="system.login.HeadLabel"></h3>
<div class="alert alert-danger display-hide">
<button class="close" data-close="alert"></button>
<span data-i18n="login.LoginTipInfo"></span>
</div>
<div class="form-group">
<label class="col-md-5 control-label bold" data-i18n="system.login.UserName"></label>
<div class="col-md-7">
<input class="form-control input-inline input-middle" type="text" id="txt_usr_name" autocomplete="off" placeholder="用户帐号" name="operatorName"
style="position:relative; left:-27px;"/>
</div>
</div><br><br>
<div class="form-group" style="margin-top:8px;">
<label class="col-md-5 control-label bold" data-i18n="system.login.UserPassword"></label>
<div class="col-md-7">
<input class="form-control input-inline input-middle" type="password" id="password" autocomplete="off" placeholder="帐号密码" name="loginPwd"
style="position:relative; left:-27px;"/>
</div>
</div>
</form>
<div class="form-actions">
<label class="checkbox" style="position:relative;left:20px;">
<input type="checkbox" name="remember" value="1"/> <span data-i18n="system.login.SavePwd">记住密码</span> </label>
<button class="btn blue pull-right col-md-3" style="margin-top:30px; " id="btnLogin" onclick="check();"
data-i18n="system.login.Login">
登录
</button>
<button type="reset" class="btn blue pull-right col-md-3" style="margin-top:30px; position:relative; left:-20px;" id="btnReset" onclick="reset();" data-i18n="system.login.Reset">
重置
</button>
</div>
$(document).ready(function(){
$(document).keydown(function(event){
if(event.keyCode==13){
$("#btnLogin").click();
}
});
});
在有多个input的表单当中按回车按钮,如何不自动提交表单,而触发某个按钮的事件
标签:
原文地址:http://www.cnblogs.com/zhu-java/p/4564830.html