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.
本人博客欢迎转载!但请注明出处!本人博客若有侵犯他人之处,望见谅,请联系我。希望互相关注,互相学习 --PheonixHkbxoic