Positioning of a pair of elements
In JS, you can use the ID, class, name, tag name for element positioning
ID, class is used in the client
Name is used on the service side
Locate with ID --only one can be found by ID
var a = document.getElementById ( "id name" )
--Change the found to the variable a
Use class to locate
var a = documen.getelementsbyclassname ( "class name")
--Find the array according to ClassName.
Positioning with Markers
var a = document.getElementsByTagName ("tag name")
--based on the tag name, find out the array
Use name to locate
var a = Document.getelementsbyname ( "name name" )
--Search by name, find out the array
Two mastery of three events
onclick --click events
onmouseover -mouse Move-in event
onmouseout --Mouse out event
Three styles of control marks
Tag object. style. style = "value";
Style "-" to delete, the first letter in the back becomes uppercase
On the right side of the equal sign, you can see the value of the inline style of the element.
JS, the object's Index property, you can record a value of type int
JS Dom Operation (ii) Window.docunment object operation