Filter (Advanced Search)
Downloads
0
Views
242
Video

Video is not available... Embedded is previous playlist.

Details

The <script> element is used to define client-side JavaScripts.

The following JavaScript writes "Hello JavaScript!" into an HTML element with id="demo":


<!DOCTYPE html>
<html>
<head>
  <title>Script Element</title>
  <script>
  function myFunction() {
    document.getElementById("demo").innerHTML = "Hello JavaScript!";
  }
  </script>
</head>
<body>

<h1>GSSS KHOKHAR</h1>
<p id="demo">A Paragraph</p>
<button type="button" onclick="myFunction()">Try it</button>

</body>
</html>



Ad