Answers for "how to get the inner text from a tag in javascript"

7

HTML DOM innerText

var x = document.getElementById("myBtn").innerText;
Posted by: Guest on February-28-2021
-1

innertext of element js

var text = document.querySelector('#text').innerText; //'#':id '.':class
Posted by: Guest on March-13-2022

Code answers related to "how to get the inner text from a tag in javascript"

Browse Popular Code Answers by Language