[removed] Overriding alert()

后端 未结 12 2302
忘了有多久
忘了有多久 2020-11-22 03:17

Has anyone got any experience with overriding the alert() function in JavaScript?

  • Which browsers support this?
  • Which browser-versions sup
12条回答
  •  日久生厌
    2020-11-22 04:02

    There are no dangers in Overring alert function. Every browser supprts it.

    for example:

    // function over riding. Redirecting to Console with Firebug installed.
    function alert(message) { 
        console.info(message);
    } 
    
    alert('This is an override.');
    

提交回复
热议问题