jq: $(function(){ $('div').hover(function(){ $(this).text('y'); },function(){ $(this).text('x'); }); }) body里<div>x</div>