The Link\" />
So I\'ve got some specific question.. I already know
Im my browser, this doesn't work at all. The tooltip field doesn't show a link, but <a href='#' onClick='alert('Hello World!')>The Link</a>
.
I'm using FF 3.6.12.
You'll have to do this by hand with JS and CSS. Begin here
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>
When you click on the image you'll get the alert:
<img src="logo1.jpg" onClick='alert("Hello World!")'/>
if this is what you want.
<img title="<a href="javascript:alert('hello world')">The Link</a>" />
no, you can't do that, but you can use event handlers to change the title:
<img src="foo.jpg" onmouseover="this.title='it is now ' + new Date()" />