Form Object Properties filter selectors and special selectors this
1 The Form object property Selector is designed for form elements and can be appended to other selectors to filter the selected form elements
2 Description of the Form object property Selector
$ (": Enabled") Pick available form elements
$ (":d isabled") Select an unavailable form element
$ (": Checked") Select the selected <input> element
$ (": Selected") Select the selected <option> element
3 selectors apply to check boxes and radio boxes, drop-down box elements use the selected selector
4 input:checked Selector Selects only <input> elements in any browser
5 The difference between this and $ (this)
This is a keyword in JavaScript that indicates that the current context object is an HTML object that can invoke properties and methods owned by an HTML object
$ (this) means that the context object is a jquery context object that can invoke the methods and property values of jquery
6 in JavaScript This is dynamic, meaning that the context object can be changed dynamically by means of call and apply.
7 This is a reference to the DOM element itself, in the DOM this is a pointer to this HTML element object
8 in the AddEventListener binding event, this points to the current DOM object, which can be obtained through this when it is modified again, but it is more complex, and it is much easier to make this a jquery object
9 getting to the referenced method through this
such as P.addeventlistener (' click ', Function () {
This===p
Both of the following modifications are equivalent
This.style.color= "Red";
P.style.color= "Red";
},false);
How to process this as a jquery
such as $ (' P '). Click (function () {
Convert p elements into jquery objects
var $this =$ (This)
$this. CSS (' Color ', ' red ')
})
jquery--Form Object Properties Filter selectors and special selectors this