acquire knowledge and impart it to the people
Using the DOM function we could find the element using class name and then from that search list go to first index and get the required attribute.
document.getElementsByClassName('class_name')[0].getAttribute('id');
No comments:
Post a Comment