Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[javascript] Link of Minute
#1
Credits and Source: http://jsmadeeasy.com/

Name: Link Of Minute
Description: JavaScript will create a link that will change depending on the minute of the hour! You can add as many entries as you want!
Snippet:

Insert into <BODY>
Code:
<SCRIPT LANGUAGE="JavaScript">

<!-- Original:  Joe Merical  -->



<!-- Begin
var links = 12; // set this to the number of links you have below!
var dateCur = new Date();
var rd = dateCur.getMinutes();
var ra = rd % links;
var re = ++ra;
var url = "document.write(re)";
var text = "";
if (re == 1) {
url = "http://javascriptsource.com";
text = "The JavaScript Source";
}
if (re == 2) {
url = "http://www.htmlgoodies.com/";
text = "HTMLgoodies";
}
if (re == 3) {
url = "http://www.ask.com/";
text = "Ask.com Search Engine";
}
if (re == 4) {
url = "http://www.microsoft.com/";
text = "Microsoft, Inc.";
}
if (re == 5) {
url = "http://www.netscape.com/";
text = "Netscape's web site";
}
if (re == 6) {
url = "http://www.hotbot.com";
text = "HotBot's Search Engine";
}
if (re == 7) {
url = "http://www.internet.com";
text = "Internet.com";
}
if (re == 8) {
url = "http://www.altavista.digital.com";
text = "Digital Altavista - A Search Engine";
}
if (re == 9) {
url = "http://www.webdiner.com/";
text = "Web Diner - Help on the Web";
}
if (re == 10) {
url = "http://www.smartclicks.com/";
text = "SmartClicks - Free advertising on the Web";
}
if (re == 11) {
url = "http://www.trailerpark.com/flamingo/chowch/aj/";
text = "Awards Jungle - One Stop Awards Submission";
}
if (re == 12) {
url = "http://www.geocities.com/";
text = "Geocities - Get a FREE web site";
}
var link="<A TARGET=\"_top\" HREF=\""+url+"\" onMouseOver=\"window.status='"+text+"'\">"+text+"</A>";
document.write(link);
// End -->
</SCRIPT>

That's it
Thankyou for reading. Be happy always Smile
Reply
#2
Thanks, I was going to write something like that.
Reply
#3
No problem
Reply
#4
i like that code many many thank poster...

[Image: ubuntu_5.11.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Free Worker HTML, CSS, Javascript ImFocuzz 2 1,286 04-05-2014, 10:01 PM
Last Post: VHPanda
  [MyBBError Message] PLEASE HELP ME!! Enable Javascript Registration Error iRun 4 1,931 01-26-2012, 03:13 PM
Last Post: iRun
  Close Tab With Javascript. Qua 3 1,414 07-02-2011, 07:25 AM
Last Post: djakariuz
  Keyboard shortcuts with JavaScript rockclimber66 12 3,127 05-07-2011, 01:21 AM
Last Post: Danny
  Javascript Help. Form Submission. JohnRonder 0 891 02-01-2011, 11:12 AM
Last Post: JohnRonder

Forum Jump:


Users browsing this thread: 1 Guest(s)