How to remove a textarea element

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.

    
asked by anonymous 02.06.2018 / 18:37

2 answers

3
document.getElementById("g-recaptcha-response").style.display = "block" ;
    
02.06.2018 / 18:39
0

You can remove display simply by 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 from none to block , although both values make the element visible.

    
02.06.2018 / 20:10