如题!
//添加事件function AddEvent(TargetObj, EventType, FunctionName){ !document.all ? TargetObj.addEventListener(EventType, FunctionName, false) : TargetObj.attachEvent("on" + EventType, FunctionName);}