Javascript language

Confirm Box in JavaScript
Previous Home Next

Step 1. Written below code in your application.

<script type="text/javascript">
function show_box()
var r=confirm("Press a button");
if (r==true)
  alert("You pressed OK!");
  alert("You pressed Cancel!");
<input type="button" onclick="show_box()" value="Confirm box" />


Step 2. Run the Application. Click on Button.

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Comment / Feedback: