防止发生浏览器默认的行为的通用函数

  小贺

  function stopDefault( e ){

    //防止默认浏览器行为(W3C)

    if( e && e.preventDefault )

    e.preventDefault();  


     //IE 中阻止浏览器行为的捷径
    else
     window.event.returnValue = false;
    
      return false;
}
原文地址:https://www.cnblogs.com/NetSos/p/1837977.html