How do I get label text in JavaScript?

You can retrieve the text of a label in JavaScript as follows (where "lblTest" is the name of our label control):

var lblText = document.getElementById("lblTest").innerText;


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 09/22/11
Comment or report problem with topic