JavaScript How To

Basically JavaScript is a dynamic computer programming language. It's major benefet is, it is lightweight and most commonly used as a part of web pages, whose implementations allow client-side script to interact with the user and make dynamic pages. It is an interpreted programming language with object-oriented capabilities. JavaScript is also used android applications.

To Change HTML Content

There are many method to change HTML content, in this example HTML methods is getElementById().
To the target the HTML content id name example is used and changes the element content (innerHTML) to "Hello World":

document.getElementById("example").innerHTML = "Hello World";


To Change HTML Styles (CSS)

HTML content style can be changed using javascript. To change the style of html content html attribute is targeted in this example.

document.getElementById("example").style.color = "black";


To Hide HTML Elements

To hide the the HTML elements, display property of css is used in this example.

document.getElementById("example").style.display = "none";


To Show HTML Elements

To hide the the HTML elements, also display property of css is used in this example.

document.getElementById("example").style.display = "block";








The Best

Comment here

If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.