get string of element
snippet in javascript

get string of element

user2590

var x = document.getElementById("myBtn").textContent;