I am trying to find, if I can pass a value on the title attribute of a label element using Javascript?
title
label
I have tried the following Javascrip
Try this way:-
TEST
window.onload = function() { document.getElementById('lab').setAttribute('title','mytitle'); alert(document.getElementById('lab').title); }
Refer LIVE DEMO