<img title="<a href='#' onClick='alert('Hello World!')>The Link</a>" />
So I've got some specific question.. I already know that I can work with attributes inside a TITLE attribute.. But can I work with events inside a TITLE attribute?
(btw - It seems like a rubbish code, but this already works as is should on my web project - I just need a way to use some Javascript on this sheathed link.)
I USE Jquery framework.
Link title attribute. The Link title is an optionally defined attribute to give additional, advisory information about a linked web site. It helps clarify or further describe the purpose of a link that a recipient should know before clicking it.
The title attribute is used to provide additional information to help clarify or further describe the purpose of a link.
No, this is, as you say "rubbish code". If it works as should, it is because browsers try to "read the writer's mind" - in other words, they have algorithms to try to make sense of "rubbish code", guess at the probable intent and internally change it into something that actually makes sense.
In other words, your code only works by accident, and probably not in all browsers.
Is this what you're trying to do?
<a href="#" onClick="alert('Hello World!')"><img title="The Link" /></a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With