when on Mouse Over state on a link the status bar shows the link's location in the status bar like in the following image... is there a way to change\override this to show some desired text...
问题:
回答1:
In ie9 method 1 does not have any effect. Method 2 also defeats the purpose of concealing info, by placing active file path in status bar, rather than customary interpolated uri:
C:\\\filepath\server\local\whatever
Perhaps there is a way to use method 2. Possibly a proxy link-file location intercept. For example:
<a href="nothinghere" onclick="location.href='anylink';return false">click here</a>
where c:\links\anylink links to c:\private\privatefile ...?
Further: 'Con: can't open link in new tab / new window' ... javascript?
回答2:
Most browsers will block attempts to change the status line by default for security reasons (phishing).
You can try it anyway:
<a href="link" onmouseover="window.status='your text';" onmouseout="window.status='';">link here</a>
A second approach:
<a href="your text" onclick="location.href='your url';return false">link here</a>
Con: you can't open it in a new tabblad / window using Ctrl + click for example.
回答3:
This should work
<a href="/www.example.com/contact.html" onmouseover="window.status='Contact'" onmouseout="window.status=''">
回答4:
If you must change the status, here is a cross browser solution that works:
<a href=".: This a link" onClick="window.location='myurl.html';return false">
Downside is that it requires Javascript
Change "This is a link" to required text" and change "myurl.html" to the path of the window file.
If you need to open a url using "_blank" you can create a function that opens a new window instead.
Unfortunately ".:" has to appear at the front of the text otherwise it will render as a url. Tested in IE9. (Firefox and other browsers render this differently
For other browser you could alternatively use "link:" then your url. Tested in Firefox.
NB: you can only change window.status for Opera, (and possible IE 6 and earlier), for security reasons as mentioned in other people's suggestions.
回答5:
onmouseover
or JavaScript
are removed from ckeditor
of blog sites when we try to input to a page more data next time. So I think, this method should work tested by me in Firefox browser.
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.btn { border:none; }
</style>
<form action="your url"> <input type="submit" class="btn" value="link here">
</form>
</body>
</html>