jQuery中 attr() 方法使用小结_jquery

WBOY
Release: 2016-05-16 16:01:39
Original
1178 people have browsed it

定义和用法

attr() 方法设置或返回被选元素的属性值。

根据该方法不同的参数,其工作方式也有所差异。

实例1

设置被选元素的属性和值。

    
jQuery中 attr() 方法使用小结_jquery
Copy after login

实例2

返回被选元素的属性值。

    
jQuery中 attr() 方法使用小结_jquery
Copy after login

以上所述就是本文的全部内容了,希望大家能够喜欢。

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!