SkillAgentSearch skills...

Selector

This file has completed the selector function,Support ID,Class,TagName,universal selector,descendant selector,Child selector,Attribute selectors,Group selector

Install / Use

/learn @wupengFEX/Selector
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Description

This file has completed the selector function,Support ID,Class,TagName,universal selector,descendant selector,Child selector,Attribute selectors,Group selector.

Compatible

IE6+ and other browser.

How to use

E('选择器')

Example

1. ID选择器
	E('#x')
2. Class选择器 
	E('.a') E('.b')
3. tagName选择器:
	E('div') E('span')
4. 通用选择器(*) 
	E('*')
5. 后代选择器(a b)
	E('.a .b') E('.parent .child .little')
6. 子选择器(a->b)
	E('.a>.b')
7. 相邻同胞选择器(h1+p) (h1~p)
	E('.a .y+.b ') E('.a .y~.b ')
8. 属性选择器('div[class=a]')
	E('div[class=a]') 
	E("div[class=parent] .child div[class=little]")
	E("div[class=parent] .child div[class=little]")
	E(".parent .child div[class=little]")
9. 群组选择器:('.a,#b')
	E('.a,#a,.x ')

Demo

测试页面

可以打开控制台,在里面输入测试里面的选择器均可实现
View on GitHub
GitHub Stars6
CategoryCustomer
Updated9y ago
Forks0

Languages

JavaScript

Security Score

55/100

Audited on Nov 11, 2016

No findings