js学習ノート(二)
3764 ワード
onclick
ondblclick
onmouseenter
onmouseleave
onmousemove
event.clientX;
event.clientY;
onkeydown
event.keyCode;
event.value;
onkeyup
onkeypress
document.documentElement.clientHeight;
document.documentElement.clientWidth;
document.documentElement.scrollHeight;
document.documentElement.scrollWidht;
document.documentElement.scrollTop;
document.body.scrollTop(chrome)
onfocus
onblur
onchange
onselect
onsubmit
onreset
placeholder=''; : ,
window.onlaad=function(){}
onerror
onresize
onscroll
topobj=document.getElementById('top');
topobj.οnclick=function(){
nu=navigator.userAgent;
if(nu.match(/chrome/i)){
//
document.body.scrollTop=0;
}else{
//
document.documentElement.scrollTop=0;
}
}
BOM(browser object model )
window
:
frames
opener
top
:
alert()
confirm()
prompt()
setInterval()
clearInterval()
setTimeout()
clearTimeout()
navigator
userAgent
screen ( )
height
width
availHeight
availwidth
history
back()
forward()
go(-1)
locztion
:
hash url #abc
host
href url
pathname index.html
protocol http://
search ?id=10
:
reload();
document
document
document.documentElement
document.head
document.title
document.body
document
document.getElementById()
docuemnt.getElementByTagName()
document.getElementsByClassName()
document.getElementByName()
obj.id
obj.className
obj.style
obj.title
action
methoe
getAttribute('age');
setAttribute('age','50');
js
obj.tagName;
obj.innerHTML;
obj.outerHTML;
obj.textContent;