August 14, 2009

Learning Javascript 2: Variables

var name="Test";
Defines a variable in the script.
To recall that variable named "name" in an alert box:
alert(name);
To change what to display in the alert or the message of the alert change the part of blue:
alert(name);
You can recall a function of mathmatics here in those parenthesis:
alert(45+5*2/2)
The answer will be shown in a popup alert box.



2 comments:

  1. betty@geothermalquest.netAugust 14, 2009 at 5:36 PM

    What a bright young man-keep it up! Betty

    ReplyDelete