»
AnglaisFranaisVietnamien

Imprimer - Javascript de compte à rebours réorienter Liens affiliés - JavaScriptBank.com

Version complte: jsB@nk » Heure » Compteur » Javascript de compte à rebours réorienter Liens affiliés
URL: http://www.javascriptbank.com/javascript-countdown-timer-redirecting-affiliate-links.html

Javascript de compte à rebours réorienter Liens affiliés © JavaScriptBank.comAvec cette horloge du compte à rebours JavaScript simple, vous pourrez facilement Avis aux visiteurs que le lien sera redirigée. Ce script JavaScript est assez courte et très facile à modifier comme vous voulez; si ce code est juste la plaine du code JavaScript et vous devez utiliser CSS Si vous avez besoin d'un oeil plus-catching effet.

Version complte: jsB@nk » Heure » Compteur » Javascript de compte à rebours réorienter Liens affiliés
URL: http://www.javascriptbank.com/javascript-countdown-timer-redirecting-affiliate-links.html



CSS
<style type="text/css">/*     This script downloaded from www.JavaScriptBank.com     Come to view and download over 2000+ free javascript at www.JavaScriptBank.com*/body {   color: black;   background: white;   font: bold 18pt Verdana, Arial, Helvetica, sans-serif;   text-align: center;}span.counter {   color: red;   cursor: default;   font-size: larger;}div.info {   margin: 0 auto;   text-align: left;   font-size: smaller;   width: 80%;   margin-top: 2em;}</style>


JavaScript
<script name="countdownRedirect.js" type="text/javascript">/*     This script downloaded from www.JavaScriptBank.com     Come to view and download over 2000+ free javascript at www.JavaScriptBank.com*//** * Copyright (C) 2006-2009, QuietAffiliate.com. All rights reserved. * * Script Name: Countdown Redirect * * THIS SOURCE CODE MAY BE USED FREELY PROVIDED THAT * YOU DO NOT REMOVE THIS MESSAGE. * * You can obtain this script at http://www.QuietAffiliate.com */function countdownRedirect(url, msg){   var TARG_ID = "COUNTDOWN_REDIRECT";   var DEF_MSG = "Redirecting...";   if( ! msg )   {      msg = DEF_MSG;   }   if( ! url )   {      throw new Error('You didn\'t include the "url" parameter');   }   var e = document.getElementById(TARG_ID);   if( ! e )   {      throw new Error('"COUNTDOWN_REDIRECT" element id not found');   }   var cTicks = parseInt(e.innerHTML);   var timer = setInterval(function()   {      if( cTicks )      {         e.innerHTML = --cTicks;      }      else      {         clearInterval(timer);         document.body.innerHTML = msg;         location = url;        }   }, 1000);}window.onload = function() {countdownRedirect("http://www.javascriptbank.com", "Thanks For Visiting")}</script>


HTML
<div class="info">This is a demo page of the redirect script in action, code and instructions can be found at <strong>QuietAffiliate.com</strong><br /><br /><center>You will automatically be redirected in <span class="counter" id="COUNTDOWN_REDIRECT">10</span> seconds.</center></div>