daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest Sep 23rd, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3.     <title>Случайный цвет фона</title>
  4.     <script>
  5.  
  6.         var colors = ['red', 'green', 'blue'];
  7.  
  8.         function init() {
  9.             var num = Math.floor(Math.random() * colors.length);
  10.  
  11.             document.body.style.background = colors[num];
  12.         }
  13.  
  14.         window.onload = init;
  15.     </script>
  16. </head>
  17. <body>
  18.  
  19. </body>
  20. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top