enter回车提交表单

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

<input type="input" />

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


</script>

  

posted @ 2015-12-14 18:57  weixin186  阅读(121)  评论(0编辑  收藏  举报