Change Link Colors : Hyper Link : HTML JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » HTML » Hyper Link »

 

Change Link Colors



<html>
<head>
<script language="JavaScript">
<!--
function changeLinkColors() {
  var dateToday = new Date();
  var dayToday  = dateToday.getDay();
  var linkText  = "here";
  var theUrl    = "";
  if (dayToday == 0) { document.linkColor = "Yellow" // Sun
  if (dayToday == 1) { document.linkColor = "Aqua"   // Mon
  if (dayToday == 2) { document.linkColor = "White"  // Tue
  if (dayToday == 3) { document.linkColor = "Red"    // Wed
  if (dayToday == 4) { document.linkColor = "Blue"   // Thu
  if (dayToday == 5) { document.linkColor = "Green"  // Fri
  if (dayToday == 6) { document.linkColor = "Black"  // Sat
}
changeLinkColors();
//-->
</script>
</head>
<body>
<basefont size=4>
If it is a Sunday, <a href="http://www.navioo.com">this</a> link will be
colored <font color="Yellow">Yellow</font>.
</body>
</html>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo HTML
» Hyper Link