JavaScript Confirm Box Example

A confirm box is often use to verify or accept some confirm message and display on browser. When a confirm box display on browser, the user allow to click either "OK" or "Cancel" to proceed.


<!DOCTYPE html>
<html lang="en">
  <title>JavaScript Confirm Box</title>

  <input type="button" onclick="confirm('Are you sure you want to learn next chapter?')" value="Open Confirm Box" />


Run it...   »

Example Result