Home > Web Front-end > JS Tutorial > jQuery research experience: Get the value of the attribute_jquery

jQuery research experience: Get the value of the attribute_jquery

WBOY
Release: 2016-05-16 19:07:49
Original
942 people have browsed it

How to get the value of an attribute?
Html:

sss

Get the value of attribute custom attribute Bruce:
alert($("div[@Bruce]").attr("Bruce"));
Get the content of the Div whose attribute Bruce is Yes:
alert($("div[@Bruce]").html());
alert($("div[@Bruce=Yes]"). html());
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template