Simple Example of Javascript

<!DOCTYPE html>
<html>
<body>

<h1>Simple Example of javascript</h1>

<p id="demo">Test</p>

<button type="button" onclick='document.getElementById("demo").innerHTML = "Hello JavaScript!"'>Click Me!</button>

</body>
</html>

it will display out

Simple Example of javascript

Hello JavaScript!