You cannot "modify alert". And it would make little sense. Please see my recent article which explains all related issues in detail:
Modal Popup From Scratch[
^].
In this article, I,first of all, explain the concept of "modal popup". Main point is: "alert", "confirm" and "prompt" are hardly can be considered suitable for any production-level application.
You don't have to use my code. First of all, my article explains how to create such facility by yourself, and explains where you can find other implementations. First of all, it's jQuery UI dialog and numerous 3rd-party plug-ins to it.
—SA