enter回车提交表单

<style>
#XY{
	40px;
	height:100px;
	background:#aaa;
}
</style>

<input type="input" />

<script>
$(document).ready(function() {  
     $("input").keyup(function(e){
		    if(e.which=="13"){
			   alert("回车提交!")
		    }
		})
});


</script>

  

原文地址:https://www.cnblogs.com/weixin186/p/5046196.html