javascript jquey 之 event.keyCode

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<head>
<script type="text/javascript" src="http://www.w3school.com.cn/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("input").bind({
    keydown:function(event){  alert(event.keyCode); return false;
  for(i in event){
   document.write(i +"  <br/>   " + event.keyCode);
  }},
    });
});
</script>
</head>
<body>
<p>This is a paragraph.</p>
<input type='text' value='dddd'></input>
</body>
</html>

你可能感兴趣的:(JavaScript,js,jquery,休闲,event.keyCode)