jquery attr과 prop 차이점 (attr vs prop)


jquery attr과 prop 차이점 (attr vs prop)

1. 개요 - jQuery 1.6/1.6.1에서 .attr()와 .prop()로 나눔 ( checkbox에 버그가 존재해서 ) * 공식 API 문서 ( http://api.jquery.com/prop/ ) The difference between attributes and properties can be important in specific situations. Before jQuery 1.6, the .attr() method sometimes took property values into account when retrieving some attributes, which could cause inconsistent behavior. As of jQuery 1.6, the .prop() method provides a way to explicitly retrieve property values, while .attr() retrieves attributes. 2. .attr(),...


#IT·컴퓨터

원문링크 : jquery attr과 prop 차이점 (attr vs prop)