Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get the text of a tag

var el = document.querySelector('div');
text = el.textContent || el.innerText;
console.log(text);
Comment

PREVIOUS NEXT
Code Example
Javascript :: tribonacci sequence javascript 
Javascript :: get the state of a checkbox 
Javascript :: javascript set class on div 
Javascript :: js array includes 
Javascript :: react native getstream 
Javascript :: adding element to javascript object 
Javascript :: run function then empty it 
Javascript :: generate express js project 
Javascript :: != vs !== javascript 
Javascript :: download images from http link in react 
Javascript :: change localhost react 
Javascript :: momentjs format date 
Javascript :: how to get output of console.log in a file in javascript 
Javascript :: localstorage try catch 
Javascript :: mongodb data types 
Javascript :: document queryselectorall and map javacript 
Javascript :: uppercase in javascript 
Javascript :: js console log multiple 
Javascript :: remove .html from url express js 
Javascript :: vue mapgetters with parameter 
Javascript :: how to put react compnent to bottom 
Javascript :: javascript redirect with extra url arguments 
Javascript :: datatables server side 
Javascript :: at in js 
Javascript :: how to remove child element in jquery 
Javascript :: mongoose delete 
Javascript :: JavaScript Number() Function 
Javascript :: js increment and decrement function for cart 
Javascript :: jquery before submit 
Javascript :: react i18n outside component 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =