Saturday 4 August 2012

Javascript - Changing HTML elements

In this tutorial we delve into our first Javascript code!
We look at the document.getElementById() method and the onclick event.
In order to demonstrate the functionality of the script we will change the content of an HTML paragraph element with the click of a button
For more tutorial videos from Tutormeonline.co.za please visit the Tutormeonlineza Youtube channel

Javascript - What is Javascript?

For this tutorial you should already have a good knowledge of HTML and CSS.

What is Javascript?

Javascript is a scripting language that was designed to add interactivity on HTML web pages. A scripting language is a programming language that does not need to be compiled before its execution and is interpreted from the source code. That goes without saying that Javascript is therefore a scripting language is often embedded directly into the HTML page.
Don’t get confused with Javascript and JAVA! JAVA is a much more complex language and the two languages are significantly different in concept and design.