JavaScript

JavaScript is the most popular programming language in the world. Programming makes computers do what you want them to do.

JavaScript Can Change HTML Content:

The first methods is getElementById().
[php]
<!DOCTYPE html>
<html>
<body>

<h1>What Can JavaScript Do?</h1>

<p id="demo">Hello I am JavaScript.</p>

<button type="button"
onclick="document.getElementById(‘demo’).innerHTML = ‘Hello now I am jQuery’">
Click Me!</button>

</body>
</html>

[/php]
OUTPUT :


What Can JavaScript Do?

Hello I am JavaScript.


Leave a Reply