DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
get the text of a tag
var el = document.querySelector('div'); text = el.textContent || el.innerText; console.log(text);
Source by plainjs.com #
PREVIOUS
NEXT
Tagged:
#text
#tag
ADD COMMENT
Topic
COMMENT
Name
4+9 =
Submit