-->


Welcome to the Javascript Introduction Homepage, Guest!


Javascript | Programming language of the World Wide Web


Javascript is an easy to learn programming language used by HTML to give web applications additional functionality. Javascript, referred to as JS too, is a way to program the exact behavior of a web application. JS works along side HTML and CSS to create a triade of success. JS was created by Brendan Eich in 1995, and the official name of the language is ECMAScript. JS and Java are two different languages completely. So, what can JS do exactly?

JS can change the text located on this line dynamically with the click of a .

--The code to change text with a button is located below--




<div id="js_introduction1">JS can change the text located on this line dynamically with the click of a


<button type="button" onclick='document.getElementById("js_introduction1").innerHTML = "Javascript can do many different things, mate."'>button</button>.</div>


Notice how JS, uses the getElementById function to change the innerHTML, which is what is hard coded in the element, to change the value of the DOM element. JS can be used to change the HTML styles of a web application; CSS.

.




<p id="abc1">


text will go here


<br>


</p>



<button type="button" onclick='document.getElementById("abc1").style.fontSize = "25px";


document.getElementById("abc2").innerHTML = "Text that will appear on the element below"'>BTN-Text</button>.</p>



<p style="margin-left: 50px;" id="abc2"></p>




Javascript can be used to make elements disappear or just revert back to a null state,


The code to hide the text within an element is located below. Once the button is clicked, the element marked with id tutorial1 will revert back to a null state.




<!DOCTYPE html>


<html>


<body>



<h2>JS can be used to hide elements</h2>



<p id="tutorial1">JavaScript can hide HTML elements by id and etc</p>



<button type="button" onclick="document.getElementById('tutorial1').style.display='none'">Hide</button>




</body>


</html>





Javascript can show hidden HTML elements with ease,


The code to show hidden elements is located below. The element id names must match up in order for the elements information to changed.




<p id="tutorial2" style="display:none;">BOOOOoooOOooOooOOoo..</p>



<p>



Javascript can show hidden HTML elements with ease,



<button type="button" onclick="document.getElementById('tutorial2').style.display='block'">Click here</button>



</p>




Next, we will look

Just follow the buttons to continue the tutorial, Guest