jQuery attr() Method

jQuery gives us the means to manipulate the properties of the HTML elements. We can modify the attributes later on after getting access to those properties. You can use the jQuery attr() method to get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element. It works similarly to the .css() method, except with .attr(), you're not setting or changing the style rules, but the inline HTML attributes of a particular element.

jQuery Get Attribute

jQuery Set Attribute

run this source code Try it Yourself

Not set

Full Source
 (C) 2021    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About