You can set its visibility
property to hidden
.
Here is a little demonstration, where one button is used to toggle the other one:
<input type="button" id="toggler" value="Toggler" onClick="action();" /> <input type="button" id="togglee" value="Togglee" /> <script> var hidden = false; function action() { hidden = !hidden; if(hidden) { document.getElementById('togglee').style.visibility = 'hidden'; } else { document.getElementById('togglee').style.visibility = 'visible'; } } </script>
Related Posts:
- Edit webpage with javascript trick – how to “unedit”?
- How to create an HTML button that acts like a link
- How to create an HTML button that acts like a link
- (Google Map API) Geocode was not successful for the following reason: REQUEST_DENIED
- How to create an HTML button that acts like a link
- Embed image in a
- Automatically pausing html5 video as the ‘next’ button is pressed (javascript/ jquery)
- Is it possible to write data to file using only JavaScript?
- Remove CSS class from element with JavaScript (no jQuery) [duplicate]
- Is it possible to write data to file using only JavaScript?
- How to make JavaScript execute after page load?
- Set cookie and get cookie with JavaScript
- HTML Button : Navigate to Other Page – Different Approaches
- Which is better: or
- Onclick javascript to make browser go back to previous page?
- How to make JavaScript execute after page load?
- Why is my Javascript not working?
- How can I get the values of data attributes in JavaScript code?
- CSS: Moving the text down a few pixels but keeping the background still?
- Javascript: getElementById vs getElementsById (both works on different pages)
- mailto using javascript
- mailto using javascript
- Mailto using Javascript?
- How to change css property using javascript
- javascript close current window
- CSS: Moving the text down a few pixels but keeping the background still?
- I am trying to make a simple toggle button in javascript
- How to call a JavaScript function within an HTML body
- How to save user input into a variable in HTML and JavaScript
- Show/hide ‘div’ using JavaScript
- How to make JavaScript execute after page load?
- Get HTML code using JavaScript with a URL
- How to make an input type=button act like a hyperlink and redirect using a get request?
- what’s the easiest way to put space between 2 side-by-side buttons in asp.net
- Calculate percentage Javascript
- How to display image with JavaScript?
- Resize image with javascript canvas (smoothly)
- JavaScript function onhover in
- Check if an element contains a class in JavaScript?
- Hide element by class in pure Javascript
- How to play a mp3 using Javascript? [duplicate]
- mailto using javascript
- Function not defined javascript
- How to submit a form with JavaScript by clicking a link?
- How to call a REST web service API from JavaScript?
- Check a radio button with javascript
- How to change the buttons text using javascript
- AppendChild() is not a function javascript
- How can I change an element’s class with JavaScript?
- Hidden property of a button in HTML
- Why would max-width not work on this?
- JavaScript: Get image dimensions
- Why write script type=”text/javascript” when the mime type is set by the server?
- How to select an input element by value using javascript?
- How to change the buttons text using javascript
- JavaScript button onclick not working
- JavaScript button onclick not working
- Making an image act like a button
- javascript window.location in new tab
- How to create a hidden in JavaScript?
- How do I programmatically set the value of a select box element using JavaScript?
- How can I capture the right-click event in JavaScript?
- How do I clear the content of a div using JavaScript?
- How to horizontally center an element
- Include another HTML file in a HTML file
- XPath //div[contains(text(), ‘string’)] fails to select divs containing ‘string’
- Bootstrap Dropdown menu is not working
- Two divs side by side – Fluid display
- Proper way to make HTML nested list?
- How do I set a background-color for the width of text, not the width of the entire element, using CSS?
- Express Render not working return error: No default engine was specified and no extension was provided
- Jquery swipe left or right on mobile
- CSS centred header image
- Relative path in HTML
- How to center content in a Bootstrap column?
- onClick to get the ID of the clicked button
- jQuery: Uncaught Error: Syntax error, unrecognized expression
- How to use in jQuery :not and hasClass() to get a specific element without a class
- Crop the image using JavaScript
- Adjust width and height of iframe to fit with content in it
- External JavaScript Not Running, does not write to document
- Create a simple 10 second countdown
- Generating a Random Number for HTML
- HTML Links are not working
- How to extract svg as file from web page
- jQuery – Increase the value of a counter when a button is clicked
- How can I align text directly beneath an image?
- HTML vs SHTML vs PHTML
- Change background color of iframe issue
- Add HTML to single post tag
- WordPress “Page not found error” when I edit a page
- How do I put a wordpress blog into my html site?
- how add custom tag/tool in classic editor?
- Create custom markup to use in posts?
- a generated wordpress page from a form that is inputted by user [closed]
- Directorist – Dropdown doesn’t open
- Where to find the html for WordPress site? [closed]
- Query WordPress Database and Post HTML Table
- theme or plugin or server is outputting html before the init hook fires, how is it possible to prevent this
- Interactive maps in wordpress