<html>
<head>
<title>Title</title>
</head>
</body>
<script type="text/javascript">
function disableBack()
{
if(event.keyCode==32) // 禁用空格键
return false;
}
document.onkeydown=disableBack;
</script>
</html>
<html>
<head>
<title>Title</title>
</head>
</body>
<script type="text/javascript">
function disableBack()
{
if(event.keyCode==32) // 禁用空格键
return false;
}
document.onkeydown=disableBack;
</script>
</html>
本文标题:禁用某个keycode操作
本文链接:https://www.haomeiwen.com/subject/mecmxxtx.html
网友评论