JavaScript Introduction

Posted on

JavaScript is the most popular programming language in the world.

This page contains some examples of what JavaScript can do.

JavaScript Can Change HTML Content

One of many HTML methods is getElementById().

This example uses the method to “find” an HTML element (with id=”demo”), and changes the element content (innerHTML) to “Hello JavaScript”:


document.getElementById(“demo”).innerHTML = “Hello JavaScript”;



JavaScript Can Change HTML Styles (CSS)

Changing the style of an HTML element, is a variant of changing an HTML attribute:


document.getElementById(“demo”).style.fontSize = “25px”;



Did You Know?

Note JavaScript and Java are completely different languages, both in concept and design.
JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997.
ECMA-262 is the official name. ECMAScript 5 (JavaScript 1.8.5 – July 2010) is the current standard.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s