[removed] Overriding alert()

后端 未结 12 2098
忘了有多久
忘了有多久 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

    I think every Javascript implementation will support this, and there is no danger involved with it. It's commonly done to replace the plain OS-styled alert boxes to something more elegant with HTML/CSS. Doing it this way means you don't have to change existing code! The fact that it is possible makes Javascript awesome.

提交回复
热议问题