Basic I/O Commands in JavaScript

Part of the JavaScript & AJAX For Dummies Cheat Sheet

JavaScript programmers commonly use the commands shown in the following table for controlling dialog-based input and output in programs to be used on the Web.

Element Description
alert("message"); Creates a popup dialog containing "message."
stringVar = prompt("message") Send message to user in a dialog box, retrieve text input from user and store it in stringVar.
blog comments powered by Disqus
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.