function preventDefault(ev){
ev=ev||window.event;
if (ev.preventDefault){
ev.preventDefault();
} else {
ev.returnValue = false;
}
};
阻止默认事件
原文:http://www.cnblogs.com/jackyblog/p/6251872.html