js监听回车事件

<script language="javascript" for="document" event="onkeydown">
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	    if (keyCode == 13) {
	  		 controlForm(1);
	    } 
	</script>

 

你可能感兴趣的:(JavaScript)