How jquery modifies the value of the disabled property
This article focuses on "how jquery modifies the value of the disabled attribute". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how jquery modifies the value of the disabled attribute.
In jquery, you can use the attr () method to modify the value of the disabled property, using the syntax "$(selector) .attr (" disabled ", attribute value)" or "$(selector) .attr ({" disabled ": attribute value})".
The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.
In jquery, you can use the attr () method to modify the value of the disabled property.
The attr () method sets or returns the property value of the selected element.
The syntax for setting property values:
$(selector) .attr (attribute,value) $(selector) .attr ({attribute:value})
Attribute: specifies the name of the attribute.
Value: specifies the value of the attribute.
Example:
$(document) .ready (function () {$("button") .click (function () {/ / $("input") .attr ({"disabled": false}); $("input") .attr ("disabled", false);})
Click the button to modify the value of the disabled property
At this point, I believe you have a deeper understanding of "how jquery modifies the value of the disabled attribute". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!