Make the effect of dynamically prompting a hyperlink address in the status bar

Source: Internet
Author: User
Tags decrypt
Dynamic | Links generally we move the mouse over the hyperlink, ie browser's status bar will appear in the link's detailed address. This article describes how to create the effect of dynamically prompting a hyperlink address in the status bar, and the dynamic effect is very glare.

Production method:
Insert JavaScript code in <body>:
<script language= "JavaScript" >
<!--Begin
var data = "0123456789";
var done = 1;
function Statusin (text) {
Decrypt (text, 2, 1);
}

function Statusout () {
Self.status = ';
Done = 1;
}

function decrypt (text, max, delay) {
if (done) {
Done = 0;
Decrypt_helper (text, max, delay, 0, Max);
}
}
function Decrypt_helper (text, runs_left, delay, Charvar, max) {
if (!done) {
Runs_left = runs_left-1;
var status = text.substring (0, Charvar);
for (var Current_char = Charvar; Current_char < text.length; current_char++) {
Status = = Data.charat (Math.Round (Math.random () *data.length));
}
Window.status = status;
var rerun = "Decrypt_helper (' + text +" ', "+ Runs_left +", "+ Delay +", "+ Charvar +", "+ Max +"); "
var New_char = Charvar + 1;
var Next_char = "Decrypt_helper (' + text +" ', "+ Max +", "+ Delay +", "+ New_char +", "+ Max +"); "
if (Runs_left > 0) {
settimeout (rerun, delay);
}
else {
if (Charvar < text.length) {
SetTimeout (Next_char, Math.Round (delay* (charvar+3)/(charvar+1));
}
else {
Done = 1;
}
}
}
}
End-->
</script>

In a hyperlink, add code:

The red code is the dynamic hint effect for the hyperlink, and you can make the corresponding changes.
The entire code is:
<a href= "http://www.webjx.com/"

target= "_blank" > Web Teaching Network </a>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.