Category: General Attributes

Category: General Attributes

These methods get and set DOM attributes of elements

.attr()

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.

.prop()

Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.

.removeAttr()

Remove an attribute from each element in the set of matched elements.

.removeProp()

Remove a property for the set of matched elements.

.val()

Get the current value of the first element in the set of matched elements or set the value of every matched element.

© The jQuery Foundation and other contributors
Licensed under the MIT License.
https://api.jquery.com/category/manipulation/general-attributes

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部