JavaScript Prompt Dialog Box Example

A Prompt Box is often use to get a value from user (means input to the value from user) and after value using the specify purpose can be process.


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

  <input type="button" onclick="prompt('Enter your lucky digit number', '2')" value="Open Prompt Box" />


Run it...   »

Example Result