Skip to content

Instantly share code, notes, and snippets.

@KazChe
Created August 8, 2012 16:16
Show Gist options
  • Save KazChe/3296299 to your computer and use it in GitHub Desktop.
Save KazChe/3296299 to your computer and use it in GitHub Desktop.
get label's value from id - error message issue
labels = document.getElementsByTagName('label');
len = labels.length;
for(var i = 0; i < len; i++) {
if(labels[i].htmlFor == elementId) {
errLabel= labels[i].innerHTML;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment