Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kmdsbng/359817 to your computer and use it in GitHub Desktop.
Save kmdsbng/359817 to your computer and use it in GitHub Desktop.
(function () {
function setTitle(elements) {
for (var i=0; i < elements.length; i++) {
elements[i].title = elements[i].name;
}
}
var elements = document.getElementsByTagName('input');
setTitle(elements);
elements = document.getElementsByTagName('select');
setTitle(elements);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment