The status of JS windows can control the State Bar information (the effect is not visible on IE9)
var space_num=0;
var dir=1;
function Myscroll () {
var space_my= "";
Space_num=space_num+1*dir;
if (space_num>50 | | space_num<0) {
Dir=dir*-1
}
for (Var i=0;i<space_num;i++) {
space_my+= ""
}
window.status=space_my+ ' Hello World '
}
function Startit () {
SetInterval (' Myscroll () ', 100)
}
</script>
<body onload= "Startit ()" >
History.
Location.
Navigator.
Screen.
Event
1. Bind directly to an HTML control such as <input onlocick= ' function () ' >
2. After getting the element through getElementById (), Start again
<script>
function Function1 () {
}
getElementById (' xx '). Onlick=function1
</script>
<table id= ' xx ' ...>
Unbind events
getElementById (' xx '). DetachEvent (' onclick ', function)
getElementById (ID): Details if many of the same IDs (such as id= ' CC ') are present, the first one will be taken
The principle of ID do not start with a number
Getelementsbyname () returns the collection of objects through the HTML control name
The ID can be not unique, but name can be unique
getElementsByTagName () returns a collection of objects via HTML tags
Createelenment () Creates an element that specifies a label name (such as dynamic)
JS Basic x1