jQuery $obj.val() vs $obj.attr(“value”){转}



The gist is that .attr(...) is only getting the objects value at the start (when the html is created). val() is getting the object's property value which can change many times.

你可能感兴趣的:(jQuery $obj.val() vs $obj.attr(“value”){转})