rizwansyed Posted September 24, 2018 Share Posted September 24, 2018 Hi I have 3 submit buttons. When ever i click on one button, the other 2 buttons test should not be visible. <form action="/action_page.php"> Rate : <input type="text" name="firstname" size="45"><br><br> Value: <input type="text" name="lastname" size="45"> <br><br> <body> <button type="button" onclick="tot1_reset()">Reset</button> <p id="tot1_reset"></p> <script> function tot1_reset() { document.getElementById("tot1_reset").innerHTML = "is reset "; } </script> <button type="button" onclick="tot1_start()">Start</button> <p id="tot1_start"></p> <script> function tot1_start() { document.getElementById("tot1_start").innerHTML = " is running "; } </script> <button type="button" onclick="tot1_stop()">Stop</button> <p id="tot1_stop"></p> <script> function tot1_stop() { document.getElementById("tot1_stop").innerHTML = " is Stopped "; } </script> </body> </form> I have attached a image related to my output. Please help Thanks and Regards Rizwan Syed Link to comment Share on other sites More sharing options...
dsonesuk Posted September 24, 2018 Share Posted September 24, 2018 (edited) You would need to target the others to change from display: block, to display: none OR another option invisibility: visible; to invisibility: hidden; The first will remove it completely, allowing other elements to occupy the space it used to occupy , the later will just hide without vacating the space it occupies. OH yea! all the html elements that make up the website layout, are placed INSIDE the body! element. Edited September 24, 2018 by dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now