按钮与回车键关联的js代码
摘要:functiononEnterDown(){if(window.event.keyCode==13){onButOk();}}functio...
<html>
<head>
<script language='javascript'>
function onEnterDown(){
if(window.event.keyCode == 13){
onButOk();
}
}
function onButOk(){
--按钮的事件;
}
</script>
</head>
<body onkeydown='onEnterDown();'>
<input id="ButOk" type="button" accesskey="" value="登录" />
</body>
</html>
【按钮与回车键关联的js代码】相关文章:
★ 点击按钮文字变成input框,点击保存变成文字的实现代码