Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h2>Use JavaScript to Change Text</h2>
<p>This example writes "Hello JavaScript!" into an HTML element with id="demo":</p>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = "Hello JavaScript!";
</script>
</body>
</html>
Full Example of The HTML <script> Tag | HTML JavaScript |
What is HTML JavaScript | HTML JavaScript |
How to use The HTML <script> Tag | HTML JavaScript |
How to create A Taste of JavaScript | HTML JavaScript |
How to create The HTML <noscript> Tag | HTML JavaScript |
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML JavaScript |
Uploaded by: | Admin |