javascript回车登录
function keyEnter(){
if (event.keyCode == 13){
check();
}
}
check为验证登录函数。以上方法支持ie8和chrome。火狐没试。
html代码为:
<label for="password">密码</label><input type="password" id="password" name="user.password" onkeypress="keyEnter();" />
function keyEnter(){
if (event.keyCode == 13){
check();
}
}
check为验证登录函数。以上方法支持ie8和chrome。火狐没试。
html代码为:
<label for="password">密码</label><input type="password" id="password" name="user.password" onkeypress="keyEnter();" />