关于query Javascript CSS Selector engine_jquery

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

query是一个javascript css selector engine,小巧而功能强大,压缩后2k左右,可以很轻松的集成到代码当中。
支持浏览器

IE6+、Firefox、Chrome、Safari、Opera

选择器
query(selector[,context])
div
#intro
div#intro
.red
span.red
[name]
[name=keywords]
input[name]
input[name=keywords]
input[name='keywords']
input[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

原生方法

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");
query.extend
Example:
query.extend({
getByCity:function(){...}
});
var city=query.getByCity();

下载: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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!