Advertisement
swaggboi

Untitled

Jun 25th, 2024
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const bodyStyle = document.body.style;
  2.  
  3. function setImage(url) {
  4.     bodyStyle.backgroundImage = "url('" + url + "')";
  5. }
  6.  
  7. switch (new Date().getMonth()) {
  8.     case 5: // Just to test for now
  9.         setImage('/images/topwwbackground.gif');
  10.         break;
  11.     case 9:
  12.         setImage('/images/halloween_background_1.gif');
  13.         break;
  14.     case 11:
  15.         setImage('/images/christmas.gif');
  16.         break;
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement