top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is difference between prop and attr?

+2 votes
331 views
What is difference between prop and attr?
posted Jul 14, 2015 by Shivaranjini

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

jQuery.attr()
Gets the value of an attribute for the first element in the set of matched elements.

Whereas:

jQuery. Prop ()
Gets the value of a property for the first element in the set of matched elements.

Please refer this following link for more detail: Difference Between Prop and Attr

answer Jul 14, 2015 by Manikandan J
...