javaScript summarize today

javascript brief
ECMAScript
1. syntax
2. Variable: Use only var defined using var if defined in the Summary function, then it is a local variable, if it is not using a global var. Weakly typed!
3. Data type: Type of raw data (undefined / null / String / Number / Boolean)
4. statements:
5. Operator: == === differs from the
6. function: two way (with the name of life, anonymous )

BOM对象
window:alert(),prompt(),confirm(),setInterval(),clearInterval(),setTimeout(),clearTimeout()
history:go(参数),back(),forward()
location: href属性

Event:
the onsubmit () This event is written in the form tag must have a return value.
onload () This event can only be written once and put in the body tag
other event elements into position to operate. (onclick, onfocus, onblur)

Gets the element:
document.getElementById ( "the above mentioned id")
to get the value of elements inside:
document.getElementById ( "the above mentioned id") value.

To Page Output
pop: alert (); ......
write to the browser: document.write (content);
write to the page specified location, innerHTML

Guess you like

Origin www.cnblogs.com/itboxue/p/11352884.html