Getting HTML tag attribute of an element using jQuery
Using jQuery you can get any attribute (ex: id, class, style, name, title, etc.) of any HTML tag (ex:
, etc.) using the .attr("attributeName") function. This method return a string of the element’s attribute. Example: Consider we have the following HTML tags on our page with corresponding attributes:
Comments
Post a Comment