<input id="testText" type="text" />
<div id="debug">0</div>
<script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready( function() {
$("#testText").keypress(function(e){
if(e.keyCode == 13) {$("#testText").blur();}
});
$("#testText").blur(function(){
var el = document.getElementById('debug');
el.innerHTML = parseInt( el.innerHTML ) + 1;
})
});
</script>