I did something similar recently (using jQuery):
$('#mydiv').change(function(){
Of course, I also use jQuery to set the HTML of this div. I suggest that one approach other than jQuery could be to set the HTML through your own function, which in turn can fire the onchange event.
@New in the city: From my experience this is not true. I use this on several DIVs that never get focus in the first place, and it works well and consistently. The usual behavior, as you describe, and usually only applies to INPUT and SELECT elements, but this does not apply to jQuery.
source share