javascript redirect


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <body onload="javascript:setTimeout(function(){window.location.href='http://B.com'},2000);">
  2. <script>
  3. $(function(){
  4. $('.noscript').hide();
  5. $('.redirect').html('<p>A is now B</p><p>Redirecting...</p>');
  6. });
  7. </script>
  8. <div class="redirect">
  9. </div>
  10. <div class="noscript">
  11. <p>A is now B</p>
  12. <p><a href="http://B.com">B</a></p>
  13. </div>
  14. </body>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.