View the original version of this page!

Load



JavaScript


JavaScript is a scripting language used to make interactive web pages. It is inserted into a web page using the script element, either directly into the HTML file or loaded from a file or remote server.

JavaScript interacts with the user by altering the Document Object Model. JavaScript receives input by attaching event listeners (functions) to elements e.g. listening to click events on a button.

The following script removes a button when it is clicked:

const button = document.getElementById("my-button"); function eventListener(){ button.parentElement.removeChild(button); } button.addEventListener("click", eventListener);


The interactive elements on this website use JavaScript to toggle CSS properties and modify html elements.
This site uses 5 scripts: