visualized div elementsAttribute filter selector:$ ("Div [id]") Select All div elements containing the id attribute$ ("Input [name = 'newsletter ']") Select the input element whose name attribute is equal to 'newsletter'.$ ("Input [name! = 'Newsletter'] ") Select the input element whose name attribute is not equal to 'newsle
attribute.
Find all div elements containing the id attribute:$ ("Div [id]")
[Attribute = value]
Matching a given attribute is an element of a specific value
Find all the input elements whose name attribute is newsletter:$ ("Input [name = 'newsletter ']"). attr ("checked", true );
[Attribute! = Value]
Matching a given attribute is an element that does not contain a specific val
the id attribute$ ("Input [name = 'newsletter ']") Select the input element whose name attribute is equal to 'newsletter'.$ ("Input [name! = 'Newsletter'] ") Select the input element whose name attribute is not equal to 'newsletter '.$ ("Input [name ^ = 'News']") select all input elements whose name attributes start w
contain the John text$ ("Td:empty") Select all the arrays of TD elements that are empty (nor include text nodes)$ ("Div:has (P)") Select all DIV elements that contain p tags$ ("td:parent") Select all the element array with TD as parent nodeVisual Filter Selector:$ ("Div:hidden") Select all the hidden div elements$ ("div:visible") Select all of the visual DIV elementsAttribute Filter Selector:$ ("Div[id]") Select all DIV elements that contain the id attribute$ ("input[name= '
= ' newsletter ')" To select all the name attribute equals ' newsletter ' of the INPUT element $ ("input[name! = ' Newsletter ') Select all the name attribute is not equal to ' newsletter ' of the INPUT element $ ("input[name^= ' News") Select all the name attribute with ' news ' beginning with the INPUT element $ ("in
name attribute is newsletter:$ ("Input [name = 'newsletter ']"). attr ("checked", true );
[Attribute! = Value]
Matching a given attribute is an element that does not contain a specific value
Find all input elements whose name attribute is not newsletter:$ ("Input [name! = 'Newsletter '] "). attr (" chec
number is less than 4 in the td Element
$ (": Header ")
$ ("Div: animated ")
Content Filter selector:
$ ("Div: contains ('john')") select all elements whose div contains John text.
$ ("Td: empty") Select an array of all td elements that are empty (or contain text nodes)
$ ("Div: has (p)") Select All div elements containing the p tag
$ ("Td: parent") Select All element arrays with td as the parent node
Visual filter selector:
$ ("Div: hidden") select all the div elements to be hidden.
$ ("Div: v
elements that are empty (or contain text nodes)
$ ("Div: has (p)") Select All div elements containing the p tag
$ ("Td: parent") Select All element arrays with td as the parent node
Visual filter selector:
$ ("Div: hidden") select all the div elements to be hidden.
$ ("Div: visible") Select All visualized div elements
Attribute filter selector:
$ ("Div [id]") Select All div elements containing the id attribute
$ ("Input [name = 'newsletter ']") Selec
with td as the parent node
Visual filter selector:
$ ("Div: hidden") select all the div elements to be hidden.
$ ("Div: visible") Select All visualized div elements
Attribute filter selector:
$ ("Div [id]") Select All div elements containing the id attribute
$ ("Input [name = 'newsletter ']") Select the input element whose name attribute is equal to 'newsletter'.
$ ("Input [name! = '
$ ("Input [name = 'newsletter ']") Select the input element whose name attribute is equal to 'newsletter'.$ ("Input [name! = 'Newsletter'] ") Select the input element whose name attribute is not equal to 'newsletter '.$ ("Input [name ^ = 'News']") select all input elements whose name attributes start with 'News '.$ ("I
attribute is an element of a specific value
Matches elements that have the specified attribute with a certain value. returned value
Array Parameters
Attribute(String): attribute name
Value(String): attribute value. Quotation marks are optional in most cases. However, it is used to avoid conflicts when an attribute value contains.Example
Find all input elements whose name attribute is newsletter
HTML code:'JQuery code:$ ("Input [name = '
... Element (Note: The sequence number starts at 0 because the selected number of elements is an array.)$ ("tr:odd") Select all of the TR elements of the section 1,3,5 ... An element$ ("Td:eq (2)") select the TD element with the number 2 in all TD elements$ ("TD:GT (4)") Select all TD elements in the TD element with an ordinal greater than 4$ ("Td:ll (4)") selects all TD elements in the TD element with an ordinal less than 4Content Filter Selector:$ ("Div:contains (' John ')") Select all the el
array with TD as parent nodeVisual Filter Selector:$ ("Div:hidden") Select all the hidden div elements$ ("div:visible") Select all of the visual DIV elementsAttribute Filter Selector:$ ("Div[id]") Select all DIV elements that contain the id attribute$ ("input[name= ' newsletter ')" selects all the name attributes equal to the INPUT element of ' newsletter '$ ("input[name!= '
the section 1,3,5 ... An element
$ ("Td:eq (2)") select the TD element with the number 2 in all TD elements
$ ("TD:GT (4)") Select all TD elements in the TD element with an ordinal greater than 4
$ ("Td:ll (4)") selects all TD elements in the TD element with an ordinal less than 4
$ (": Header")
$ ("div:animated")
Content Filter Selector:
$ ("Div:contains (' John ')") Select all the elements in the div that contain the John text
$ ("Td:empty") Select all the arrays of TD
: $ ("Div:hidden"Select all of the hidden div elements $ ("Div:visible"Select all of the visual div element properties of the filter selector: $ ("Div[id]"Select all DIV elements that contain the id attribute $ ("Input[name= ' newsletter ')" selects all the name attributes equal to ' newsletter 'the INPUT element $ ("input[name!= ' newsletter ')" selects all name
attribute
$ ("input[name= ' newsletter ')"--selects all input elements that have the name attribute equal to ' newsletter '
$ ("input[name!= ' newsletter ')"--Select all the name attribute not equal to ' newsletter ' INPUT element
$ ("input[name^= ' News")--selects all input elements with the name attribut
the hidden div elements$ ("div:visible") Select all the visual div elements
Attribute Filter Selector:$ ("Div[id]") Select all DIV elements that contain ID attributes$ ("input[name= ' newsletter ']") selects all input elements that have the Name property equal to ' newsletter '$ ("input[name!= ' newsletter ']") selects all input elements that are not equal to '
When it comes to column printing et or excle, you may be affected by the Luo moderator tutorial, find it difficult, in fact, the daily form of the column printing is a piece of cake, who can easily do.
To the ROM version of the newsletter as an example, the implementation of the "edit" → "move or copy the worksheet", the newsletter copy into a new workbook (you can open their usual edited
elements nbsp; attributes filter selector:nbsp; nbsp; $ ("Div[id]") nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; Select all DIV elements with ID attributes nbsp; $ ("input[name= ' newsletter ')") nbsp; nbsp; Select all the name attributes equal to ' newsletter ' INPUT element nbsp; nbsp; $ ( "Input[name!= ' newsletter '") Select all the name attributes that are not
$ ("div:visible") Select all of the visual DIV elementsAttribute Filter Selector:$ ("Div[id]") Select all DIV elements that contain the id attribute$ ("input[name= ' newsletter ')" selects all the name attributes equal to the INPUT element of ' newsletter '$ ("input[name!= ' newsletter ')" selects all the name attribute not equal to '
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.