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.

Example

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

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

</body>
</html>

Run it...   »

Example Result