JSイベント名とイベントオブジェクト
6056 ワード
div
document
form
redDiv
redDiv.onmousemove = function(){ console.log(" ") } //
redDiv.onclik = function(){ console.log(" "); }//
redDiv.ondblclick = function(){ console.log(" "); } //
redDiv.onmousedown = function(){ console.log(" "); }//
redDiv.onmouseup = function(){ console.log(" "); }//
redDiv.oncontextmenu = function(){ console.log(" "); }
false .
over out redDiv , out , over
redDiv.onmouseover = function(){ console.log("over "); }
redDiv.onmouserout = function(){ console.log("out ") }
leave enter redDiv ( ) blueDiv ( )
redDiv.onmouseenter = function(){ console.log("enter ") }
redDiv.onmouseleave = function(){ console.log("leave ") }
// i/ redDiv .
redDiv.onkeydown = function(){ console.log("down ") }//
docunment.onkeypress = function(){ console.log(press ) }//
press ,
down
document.onkeyup = function(){ // console.log(" "); }
//
//
var uName = document.getElimentById("uName");
uName.oninput = function(){ console.log("input ") }
uName.onchange = function(){ console.log("change "); } text , , , oninput
// , , onchange
uName.onfocus = function(){ // text console.log(" ") }
uName.onblur = function(){ console.log(" "); }
// form
reg.onsubmit = function(){ console.log(" ") //return false
//return false
}
reg.onreset = function(){ console.log(" ") // return false , text // return false
}
// window window.onresize = function(){ console.log(" "); }
window.onscroll = function(){ // // , console.log(" ") }
// window.onload = function(){ consol.log(" "); }
// JS (ev)?
ev , ev , click ev e.pageX , e.pageY,keyDown ev.keyCode , ie ,ev , window.event , .
mydiv.onclick = function(ev){ if(!ev){ ev = window.event;// :ev = window.event||ev; } }