title: Do something upon accepting an alert
body: <p>I want to execute some code when an alert is accept by the user, I know about this:  </p>
  
  <pre><code>if(confirm("Go to the next step"))  
    {
      document.write("accepted");
    }  
  else{  
     document.write("rejected");  
  }  
  </code></pre>
  
  <p>the point is I want the box to have only one button like the normal alert, and by clicking it I can execute something.</p>