I have a button <input type="button" name="name" value="value"/>
. Is there any way to keep it visually pressed and unpress it via javascript?
Thanks
You can use this document. getElementById("some_id"). style. border.
Using button tag inside <a> tag: This method create a button inside anchor tag. The anchor tag redirect the web page into the given location. Adding styles as button to a link: This method create a simple anchor tag link and then apply some CSS property to makes it like a button.
In order to make it a button, change type="hidden" to type="button" . To make it invisible to the user, you could use inline styles like this: style="display: none;" . Show activity on this post. Trigger click event on the button as soon as document is ready.
I would try CSS and use the border-style inset
, personally.
<input type="button" value="Inset Border" style="border-style:inset;" />
For a list of different styles, please see this jsFiddle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With