Alert Box: Using Javascript to display a simple alert box when the page loads.
The script uses the Javascript alert(); function to generate an alert box displaying the message we gave it as an argument. "Hello world" is a programmers joke - it is the traditional first message used when learning a new code language.
Notes:
alert(); Javascript function.alert(); function.
<!-- Display an alert box with Javascript. -->
<script>
alert("Hello world");
</script>