JavaScript tutorial
JavaScript is a compact, object-based scripting language for developing client and server
Internet applications.
- JavaScript functions can be embedded directly in the HTML code and should be placed in the head of the HTML document
- To use JavaScript functions the code needs to follow the line: <SCRIPT LANGUAGE="JavaScript"> and preceed </SCRIPT>
- and bracketed by <!-- and -->
- JavaScript is case sensitive and uses new lines to terminate a line of code; semicolons can be used to separate lines of code on a line
- JavaScript uses both // and /* */ to indicate comments
- JavaScript supports data types: numeric, string, Boolean, and null
- JavaScript supports operators: +, -, *, /, %, ++, --, =, +=, -=, *=, /=, %=, &&, ||, !, &, |, ^
- JavaScript uses the control structures: if (else), for, while, and for...in
- JavaScript contains three user interfaces: alert(message), prompt(message, [Default]), confirm(message)
- JavaScript does not have built-in support for arrays, but does allow for building of arrays
- JavaScript supports four built-in objects:
- Window
- Properties: name, parent, self, top, defaultstatus, status, script, location, frame, history, navigator, document
- Methods: Alert, Confirm, Prompt, Open, Close, SetTimeout, ClearTimeout, Navigate
- Events: Onload, Unload
- String
- Math
- Date
JavaScript links
|
Links to pages displaying JavaScript
|
Click here to return to Wayne's World's homepage:
Wayne Summers summers_wayne@ColumbusState.edu