Can you please let me know how to remove a default display style attribute for a input button in JavaScript function. Tried removeAtrribute but no luck.
Thank you in advance.
HTML <input id="myInput" type="text" value="Hello world" style="display:none">
JavaScript document.getElementById('myInput').style.display = "";
As a function
function resetDisplay(element) {
element.style.display = "";
}
And call that function like this resetDisplay(document.getElementById('myInput'))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.