Answers for "innertext in javascript mdn"

0

set text of dom element

document.getElementById("myBtn").textContent = 'Hello World';
Posted by: Guest on March-05-2020
0

pull out only text from element javascript

function extractContent(html) {

    return (new DOMParser).parseFromString(html, "text/html") . 
        documentElement . textContent;

}
Posted by: Guest on November-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language