标签:
document.getElementById(‘myElement‘);
document.querySelector(‘#myElement‘);
document.getElementsByClassName(‘myElement‘);
document.querySelectorAll(‘.myElement‘);
document.getElementsByTagName(‘div‘);
document.querySelectorAll(‘div‘);
document.querySelectorAll(‘[data-foo-bar="someval"]‘)
document.querySelectorAll(‘#myForm :invalid‘);
document.getElementById(‘myParent‘).children;
document.querySelector(‘#myParent > [ng-click]‘);
document.querySelectorAll(‘#myParent A‘);
document.querySelectorAll(‘DIV:not(.ignore)‘);
document.querySelectorAll(‘DIV, A, SCRIPT‘);
CSS3:
p:not(.first) {
color: red;
}
p:not(.first):not(.fourth) {
color: red;
}
元素重1开始,没有0;
p:not(:nth-child(2)):not(:first-child) {
color: red;
}
标签:
原文地址:http://www.cnblogs.com/jayruan/p/5373306.html