方法一: $(function(){ // Bind the resize event. When any test element's size changes, update its // corresponding info div. $('.test').resize(function(){ var elem = $(this); // Update the info div width and height - replace this with your own code //