How to Create a Show / Hide Button Using HTML and Javascript

What is Javascript?

Javascript is a dynamic high-level programming language developed by Brendan Eich, which was developed by one of the previously known browser companies, namely the Mozilla Foundation and the Netscape Communications Corporation. This programming language works on several modern browsers such as Google Chrome, Mozilla Firefox, Microsoft Edge, Safaris, and others.

Javascript is a programming language asynchronous which means that this programming language works in the background where the process is being carried out on-line but not directly, just like a background process where the program works concurrently with the interactions we are performing, unlike programming languages ‚Äč‚Äčlike PHP where we have to wait for the PHP work process to complete before we can interact.

Simple example for asynchronous is like making one HTML tags appears or disappears with the push of a button, so do it.

How to create the show / hide button using html and javascript

1. You create a file .html new as desired.

2. Then type the code below into the file .html created with your favorite IDE application, or you can use Notepad if you don’t have an IDE application.

Simpan Objek apapun disini untuk dihilangkan/dimunculkan.

3. When you have entered the code above, now add the code below just below the code above.


4. Then the results obtained will be as follows.

Simpan Objek apapun disini untuk dihilangkan/dimunculkan.

5. Then try to run the file .html in the browser you normally use.

6. Done.

Remarks:

In the section Save here every object that should be removed / displayed. is a place where you will save all the HTML objects that you will be using for example like saving TextBox, Radio buttons and so on to make the object appear or disappear when the user clicks the button click me.






Leave a Reply

Your email address will not be published.