Jump to content

Selecting HTML attributes and other objects


Fmdpa

Recommended Posts

One of the things I am doing now is trying to create a custom tool tip. Basically, what I want to do is to extract the value of the title attribute, place that text in the custom tooltip and change the default tooltip's visibility to hidden. Using JS, how do I select things like attributes and objects such as the default tooltip?

Link to comment
Share on other sites

You can use one of the document methods like document.getElementsByName or one of the properties of the document object to go through the child elements. Check the Javascript and DOM references to see what's available in the document object. For each element, you can use its getAttribute method to get any attribute you want.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...