jquery之val()和attr("value")

1.attr("value")=原来的默认值 ,而val()=用户改变的值.

 

 

 

2.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.

 

posted @ 2016-07-26 10:40  PheonixHkbxoic  阅读(812)  评论(0编辑  收藏  举报