var one = document.getElementById("one");
var two = document.getElementById("two");
var three = document.getElementById("three");
var four = document.getElementById("four");
var five = document.getElementById("five");
var six = document.getElementById("six");
var seven = document.getElementById("seven");
var eight = document.getElementById("eight");
var nine = document.getElementById("nine");
var test = function(){
console.log("点击触发");
}
one.addEventListener("click",test);
two.addEventListener("dblclick",test);
three.addEventListener("mousedown",test);
four.addEventListener("mouseout",test);
five.addEventListener("mouseover",test);
six.addEventListener("mouseup",test);
seven.addEventListener("mousemove",test);
eight.addEventListener("mouseenter",test);
nine.addEventListener("mouseleave",test);
这是一些常用的鼠标事件的书写格式。。。