function addEvent(ele,type,hander){
// 执行代码
if(ele.addEventListener){
ele.addEventListener(type,hander,false);
}
/*
if(ele.attachEvent){
ele.attachEvent('on'+type,hander);
else{
ele['on'+type]=hander;
*/
IE9本来就支持,IE8-不支持