JavaScript Tutorial

« CodesCracker Home Next Tutorial »

You will learn all about JavaScript in this tutorial from basic to advance.

What is JavaScript ?

JavaScript is a client and server-side object-based scripting language that is used to make interactive Web pages. A scripting language is a lightweight programming language with less complexity.

JavaScript is the most usually used scripting language to add dynamism and interactivity to Web pages. This is because JavaScript, written on the client-side, executes on a client browser, thereby reducing the load on the server.

JavaScript is an Interpreted Language

JavaScript is an interpreted language, which implies that scripts written to JavaScript are processed line by line. These scripts are interpreted by the JavaScript interpreted, which is a built-in component of the Web browser.

JavaScript can be written on the client-side as well server-side. Client-side JavaScript allows you to validate only those programs that execute and produce the result on the client-machine. In counterpoint/contrast, server-side JavaScript validates only those programs that execute on the server. JavaScript includes various built-in objects and features that can be used to make your HTML pages dynamic.

JavaScript is platform-independent

JavaScript is platform-independent, which implies that you need to write the script once and can run it on any platform or browser without affecting the output of the script.

Why to Learn JavaScript ?

There are the three languages, all web developers must know, these are the following:

So to program the behaviour of Web pages, you must have to learn JavaScript. You will learn all about JavaScript in this tutorial.

Advantages of JavaScript

Here are the advantages of JavaScript:

A Simple JavaScript Example

Here is a simple JavaScript example.

	<title>JavaScript Tutorial</title>

<h2>JavaScript Tutorial - Learn JavaScript</h2>
<p id="test">This is a simple Example of JavaScript.</p>

<button type="button"
onclick="document.getElementById('test').innerHTML = 'Welcome to JavaScript!'">
Click Me</button>


Save the above file with .html extension like filename.html, and open it in your browser, the web page will look like:

javascript tutorial

Now click, on the button Click Me, you will watch Welcome to JavaScript! in the place of This is a simple Example of JavaScript. as shown in this image:

learn javascript

You can also try it with your own, by clicking on the below button:

JavaScript Tutorial - Learn JavaScript

This is a simple Example of JavaScript.

You will learn all about JavaScript one by one in separate tutorials. This tutorial series are divided into these parts:

JavaScript Basics Tutorial
Homepage of JavaScript Tutorial Syntax of JavaScript Program
Placements of JavaScript Code in HTML Output of JavaScript
Statements in JavaScript Keywords in JavaScript
Comments in JavaScript Variables in JavaScript
Operators in JavaScript Comparison/Logical in JavaScript
Data Types in JavaScript
JavaScript Conditional Statements Tutorial
Conditional Statements in JavaScript if Statement in JavaScript
if-else Statement in JavaScript switch Statement in JavaScript
Loops in JavaScript for Loop in JavaScript
while Loop in JavaScript do-while Loop in JavaScript
Break Continue in JavaScript
JavaScript Popup Boxes Tutorial
Dialog Box in JavaScript alert Box in JavaScript
confirm Box in JavaScript prompt Box in JavaScript
JavaScript Functions Tutorial
Functions in JavaScript Function with Parameters in JavaScript
Return Statement in JavaScript Variable Scope in JavaScript
setTimeout() Method in JavaScript setInterval() Method in JavaScript
JavaScript Events Tutorial
Events in JavaScript onclick Event in JavaScript
onload Event in JavaScript Mouse Events in JavaScript
onreset Event in JavaScript onsubmit Event in JavaScript
JavaScript Objects Tutorial
Objects in JavaScript Number Object in JavaScript
Array Object in JavaScript String Object in JavaScript
Boolean Object in JavaScript Math Object in JavaScript
RegExp Object in JavaScript Date Object in JavaScript
JavaScript Browser Objects Tutorial
Browser Objects in JavaScript Window Object in JavaScript
Navigator Object in JavaScript History Object in JavaScript
Screen Object in JavaScript Location Object in JavaScript
JavaScript Document Object Tutorial
Document Object Collection in JavaScript Document Object Properties in JavaScript
Document Object Methods in JavaScript Document Object with Forms in JavaScript
JavaScript DOM Tutorial
DOM in JavaScript DOM Nodes in JavaScript
DOM Levels in JavaScript DOM Interfaces in JavaScript
JavaScript Cookies Tutorial
Cookies in JavaScript Create/Delete Cookies in JavaScript
JavaScript Advanced Tutorial
Regular Expression in JavaScript Page Redirection in JavaScript
Form Validation in JavaScript Validations in JavaScript
Error Handling in JavaScript Exception Handling in JavaScript
try-catch throw finally in JavaScript onerror Event in JavaScript
Multimedia in JavaScript Animation in JavaScript
Image Map in JavaScript Debugging in JavaScript
Browser Detection in JavaScript Security in JavaScript

« CodesCracker Home Next Tutorial »


Quick Links
Signup - Login - Give Online Test