<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />
<script language="javascript">
function onkeydown() {
if(event.keyCode == 13) {
document.getElementById("enter").click();
return false;
}
}
</script>
</head>
<body onLoad="document.getElementById('enter').focus()">
<input type="button" id="enter" value="enter" οnclick="alert('enter');"/>
</body>
</html>
html按钮响应回车键
最新推荐文章于 2024-06-07 18:06:56 发布