Hello World

This introductory script should serve to help you gain familiarity with the syntax of JavaScript, and introduce you to some basic input/output methods.

The following code reads the user's name from a text box on the page, and then uses it to personalise a response.


<form name="myForm">
  First Name:<input type="text" name="firstName"><br>
  Last Name:<input type="text" name="lastName">
  <input type="button" value="Click Me!" onClick="alert('Hello '+ myForm.firstName.value +',thanks for filling out my form!')">
</form>

The code is implemented below:

First Name:
Last Name: