Associate
- Joined
- 6 Dec 2002
- Posts
- 661
- Location
- Belfast
Accessing a DOM attribute in JavaScript
Take the following HTML code:
Within IE the above code works perfectly in that the tooltiptext attribute can be passed straight into the someFunction function simply by stating it's name. However this does not work in Firefox. I have tried this.tooltiptext but it just states 'undefined'. How can I acheive this?
Take the following HTML code:
Code:
...
<a tooltiptext="The content of the tooltip" onmouseover="someFunction(tooltiptext);" href="#">Link</a>
...
Last edited: