How to remove a textarea element

Asked

Viewed 47 times

0

I have this textarea:

<textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;  display: none; "></textarea>

How can I remove the display: None; with javascript? Thanks

2 answers

1


document.getElementById("g-recaptcha-response").style.display = "block" ;

0

You can remove the display simply assigning it an empty value:

document.getElementById("g-recaptcha-response").style.display = "";

With display = "block" you will not be removing, but only changing the value of none for block, although both values make the element visible.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.