index values greater than 0;: LT (Index)Matches all elements that are less than the given index value$ ("Tr:lt (2)")Matches rows with index values less than 2;: HeaderMatch header elements such as H1, H2, H3, etc.$ (": Header"). CSS ("Background", "#EEE");Add background color to all headings in the page: FocusMatches the element that currently gets focus4. Attribute-dependent selectors[]$ ("Div[id]")Find all DIV elements that contain ID attributes[Attribute=value]$ ("input[name= '
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 4
$ (": Header")
$ ("div:animated")
Content Filter Selector:
$ ("Div:contains (' John ')") Select all the elements in the div that contain the John text
$ ("Td:empty")
As we all know, when the form is finished, it needs to be printed as well as the document to facilitate circulation. But what if you want to print only a subset of the data in the table? The following small series for you to introduce how the WPS table for the column printing, a look at it.
To the ROM version of the newsletter as an example, the implementation of the "edit" → "move or copy the worksheet", the new
all TR elements of the 0,2,4 ... Element (Note: Since the selected element is an array, the ordinal number is starting at 0)$ ("tr:odd") Select all TR elements of the 1,3,5 ... An element$ ("Td:eq (2)") select the TD element with the serial number 2 in all TD elements$ ("TD:GT (4)") Select all TD elements with serial number greater than 4 in TD elements$ ("Td:ll (4)") Select all TD elements with a serial number less than 4 in the TD elementContent Filter Selector:$ ("Div:contains (' John ')") S
you use the CSS visibility property so that it does not display but occupies a placeholder, you do not enter hidden.
Find all the Invisible TR elements: $ ("Tr:hidden")
: Visible
Match all visible elements
Find all the Visible TR elements: $ ("tr:visible")
6. Attribute FilterAttribute Filters
Name
Description
Example
[Attribute]
Match the element containing the given property
Find all DIV elements that cont
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 ' newsletter ' for all name properties $ ("input[name^= ' News") selects all the input e
greater than 4 in TD elements$ ("Td:ll (4)") Select all TD elements with a serial number less than 4 in the TD element$ (": Header")$ ("div:animated")Content Filter Selector:$ ("Div:contains (' John ')") Select elements in all div that contain John text$ ("Td:empty") selects all arrays of TD elements that are empty (and not including text nodes)$ ("Div:has (P)") Select all DIV elements that contain p tags$ ("td:parent") Select all array of elements with TD as parent nodeVisual Filter Selector:$
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 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") Sel
The example in this article describes the use of jquery for lookups based on the Name property. Share to everyone for your reference, specific as follows:
$ ("Div[id]")//Select all div element with id attribute
$ ("input[name= ' Newsletter '")//Select all the name attribute equals ' newsletter ' INPUT element
$ (" input[name!= ' newsletter ')//Select INPUT e
1, submit your website to the search engine, so that your site has the possibility of maximum exposure rate;
2, if you expect to get more exposure opportunities, you can pay for search engine marketing (Engine Marketing). When the browser with fixed keyword search, there will be on the search engine site on your site text ads;
3. To carry out a lottery. In a certain amount of time, if someone is registered on your website or subscribe to email newsletter
Copy Code code as follows:
$ ("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 ' newsletter ' for al
, the visibility of the filter Visibility Filters
: Hidden
: Visible
7, Attribute filter attributes Filters
Name
Description
Example
[Attribute]
Matches the element that contains the given property
Find all DIV elements that contain ID attributes:$ ("Div[id]")
[Attribute=value]
Match the given property is an element of a particular value
Finds the input element for which all name properties are
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)") Select all TD elements with a number less than 4 in the TD element $ (": Header") $ ("div:animated")
Content Filter Selector:
$ ("Div:contains (' John ')") Select elements in all div that contain John text$ ("Td:empty") selects all arrays of TD elements that are empty (and not including text nodes)$ ("Div:has (P)") Select all DIV elements that contain p
Example
: Hidden
Match all the Invisible elementsNote: In the 1.3.2 release, hidden matches an element that itself or the parent does not occupy space in the document. If you use the CSS visibility property so that it does not display but occupies a placeholder, you do not enter hidden.
Find all the Invisible TR elements: $ ("Tr:hidden")
: Visible
Match all visible elements
Find all the Visible TR elements: $ ("tr:visible")
6. At
)") match all elements greater than the given index value
638, $ ("tr: lt (2)") match all elements smaller than the given index value
64 content:
651, $ ("div: contains ('john')") match the element containing the given text
662, $ ("div: has (p)") matches all div elements containing p elements
673, $ ("td: empty") Find all empty elements that do not contain child elements or text
68
69 visibility:
701, $ ("tr: visible") Find all visible tr Elements
712, $ ("tr: hidden") matches all the invisible
Java code: $ ( quot; div [id] quot;) Select All div elements containing the id attribute $ ( quot; input [name amp; #39; newsletter amp; #39;] quot;) Select the input element $ ( quot; inpu Java code: $ ("div [id]") Select All div elements containing the id attribute $ ("input [name = 'newsletter ']") select the input element $ ("input [name! = 'Newsletter']
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! = 'Newsletter'] ") Select the input element whose name attrib
contain John text $ ("Td:empty") //Select all the array of TD elements that are empty (also excluding text nodes) $ ("Div:has (P)") //Select all DIV elements that contain P tags $ ("td:parent") //Select all the element array with TD as parent node Visual Filter Selector:$ ("Div:hidden") //Select all hidden div elements $ ("div:visible") //Select all the visual div elements Attribute Filter Selector:$ ("Div[id]") //Select all DIV elements contai
hidden DIV elements $ ("Div: visible") Select All visualized Div element attributes filter selector: $ ("Div [ID]") select All DIV elements containing the ID attribute $ ("input [name = 'newsletter ']") select all input elements whose name attribute is equal to 'newsletter' $ ("input [name! = 'Newsletter'] ") Select the input element $ (" input [name ^ = 'News']
visualized Div element attributes filter selector: $ ("Div [ID]") select All DIV elements containing the ID attribute $ ("input [name = 'newsletter ']") select all input elements whose name attribute is equal to 'newsletter' $ ("input [name! = 'Newsletter'] ") Select the input element $ (" input [name ^ = 'News'] ") where all name attributes are not equal to tho
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.