Home > Web Front-end > JS Tutorial > body text

关于query Javascript CSS Selector engine_jquery

WBOY
Release: 2016-05-16 17:37:13
Original
1138 people have browsed it

query is a javascript css selector engine, small and powerful. It is about 2k compressed and can be easily integrated into the code.
Browser support

IE6, Firefox, Chrome, Safari, Opera

Selector
query(selector[,context])
div
#intro
div#intro
.red
span.red
[name]
[name=keywords]                                                                                                                                                                  input[name *=key]
label[class~=red]
#nav>li
#nav> li
#nav >li
#nav > li
#nav li
#intro,.red,div
input[name],#nav>li

Native method

query.getById(id)
query.getByName(name)
query.getByTagName(tagName[, parent])
query.getByClass(className[, parent][, tagName])

Example:

query.getByClass("red");
query.getByAttr(name, val[, parent][, tagName])
Example:
query.getByAttr("name", "keywords",parent,"input");                                               getByCity:function(){...}
         });
var city=query.getByCity();

Download:
http://tanwei-cc.github.com/query/


https://github .com/tanwei-cc/query




Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template