change status message on page
I'm using this code to change the status bar of IE.
<a href="http://www.google.com" onmouseover="window.status='Google';return true;">Google</a>
But the problem is when i'm using a menu (lin开发者_如何学Goks inside a div) it doesn't change anymore the status bar. Is there any way to fix it?
Most modern browsers allow the user to decide, if she wants the status bar being overwritable. If it is disabled (which is, I assume, the default in many browsers), you have no way to bypass this (other than finding a zero day exploit).
Here's an awesome solution
<a href="//./ Woo status bar" onclick="this.href='http://google.com'">
No, but really though - this practice this a little outdated. Users expect to be able to see the URL of the link they're about to click to ensure it is legit. If you want to give people more information about a link, encode it either in the paragraph (eg: "take a look at this big search engine or this up-and-coming one"), or use the title
attribute on the link. The text you enter there will appear in a tooltip if the user hovers on the link.
onmouseover="window.status='Google';
works only for IE. It doesn't seem to work for FF. What browser are you testing it?
I suspect, this works in only IE but it won't work for other browsers.
<a href="http://stackoverflow.com/" onmouseover="$(this).attr('href', 'http://www.google.com')" onmousedown="$(this).attr('href', 'http://stackoverflow.com/')">Link 4</a>
This worked for me on Chrome/IE(7/8)/FF.
精彩评论