JS Prompt
Trigger window.prompt() dialogs that accept user text input. Practice reading the returned value and handling dismissal.
A browser text-entry prompt will appear. Type a value and click OK, or Cancel to return null.
Simple Name Prompt
Enter your name in the browser prompt. The result is displayed below.
Prompt with Default Value
A prompt pre-filled with a default value. You can modify it or accept it as-is.
Prompt as Part of a Form
Clicking Submit triggers a prompt asking for a coupon code before the form proceeds.