Basic and advanced module based js.
- Build dynamic web pages.
- Display alert boxes.
- Write messages to the browser status bar.
- Control features of the browser.
- Open new browser windows.
- Customize reactions to mouse actions and keystrokes.
- Validate information in forms.
- Perform calculations.
- Display
tooltips
when rolling over objects on the screen. - Create interactive
forms
. - Set date and time.
- Identify browsers and browser plug-ins such as
Flash
.
- Write files to the hard disk.
- Read files from the hard disk -- except for cookies.
- Close windows other than those the JavaScript applications opened.
- Write server-side applications, called
Common Gateway interface (CGI) applications
, which must be written using languages such asJava
,PHP
,Perl
andASP
. - Read information from a web page that resides on a domain different from the domian where the javascript code resides.
JavaScript O'Really | JavaScript demystified | JavaScript Mozilla docs |
---|---|---|
JavaScript Program Anatomy :
- Objects : are the instantiation of classes and encloses some member functions and member variables (properties or attributes).
- Properties : are the object's member variables.
- Methods : are the object's member functions, a fucntion differs from a method that it can have a return and can be assigned to another value,
member methods can be accessed from the object using the dot syntax
foobar.startRenderer();
. - Event Handlers : are overridable interfaces with some methods that are used for invoking some actions when something remotely takes place (like listening for sensor's data or button clicks or an analog device).
Copy this code into index.html
and run into a browser :
<!DOCTYPE html>
<!-- This is an HTML5 file -->
<html>
<!-- The root element -->
<head>
<!-- Title, scripts & styles can go here -->
<title>Spicing Up</title>
</head>
<body>
<!-- The body holds the content of the document. -->
<h1>Spice Up !</h1>
<script language="js" type="text/JavaScript">
const hello = "Hello World !";
document.write(hello);
alert(hello);
</script>
</body>
</html>