In CSS, it is often written in the first line of a style:
{ margin: 0; padding:0; }
The wildcard * means that the default margin is set for all elements. In jquery we can also select elements in the document page by passing the * selector.
Describe:
$ (' * ')
Aside from jquery, if you want to get all the elements in the document, passing ' * ' through document.getElementsByTagName () can also be obtained.
It is not difficult to find that Id,class,tag can get to the corresponding node through the native method, but we still have to consider a compatibility problem, and here by the way, for example:
1. IE will implement the annotation node as an element, so calling getElementsByTagName in IE will include a comment node, which is usually not expected.
2. The getElementById parameters are not case-sensitive in IE8 and lower versions.
3. IE7 and the lower version, in the form element, if the Name property name of form a uses the ID name of another element B and a before B, then Getelmentbyid will select a.
4. IE8 and the lower version, the browser does not support Getelementsbyclassname.
Full selector for jquery selector (* selector)