Advertisement
1xptolevitico69

Some dynamic with JavaScript

Nov 27th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.84 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Some dynamic with JavaScript</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width">
  7. <style>
  8.  
  9. a {
  10. text-decoration:none;
  11. color:red;
  12. font-size:50px;
  13. }
  14.  
  15. .link {
  16. transform:translate(10px)skew(-40deg);
  17. display:inline-block;
  18. }
  19.  
  20.  
  21.  
  22. </style>
  23. </head>
  24. <body>
  25.  
  26.  
  27.  
  28. <script>
  29. i=0;
  30.  
  31. document.body.setAttribute('style','font-size:25px;font-family:arial;font-weight:900;color:maroon;');
  32.  
  33.  x=["<a href='https://www.w3schools.com/js/' target='_blank'>w3schools</a>"];
  34.  c=x[i];
  35.  
  36. alert('Maybe this example\nchange the way you see Javascript');
  37.  
  38. del=setInterval(function(){
  39. document.body.innerHTML+=c[i];
  40. i++;
  41. if(i==c.length){
  42. clearInterval(del);
  43. document.body.innerHTML+='<br>'+'<span class="link">'+x+'</span>';
  44. }
  45. },150);
  46.  
  47.  
  48.  
  49.  
  50.  
  51. </script>
  52. </body>
  53. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement