Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.63 KB | None | 0 0
  1. THIS GOES IN YOUR HEAD TAGS
  2.  
  3. <link id="pagestyle" rel="stylesheet" href="css/style.css" type="text/css" />
  4.  
  5.  <script>
  6.  function swapStyleSheet(sheet){
  7.   document.getElementById('pagestyle').setAttribute('href', sheet);
  8. }
  9. </script>
  10.  
  11. THIS GOES IN YOUR BODY SOMEWHERE
  12.  
  13.  
  14. <button onclick="swapStyleSheet('css/style1.css')">Green Style Sheet</button>
  15.     <button onclick="swapStyleSheet('css/style2.css')">Blue Style Sheet</button>
  16.     <button onclick="swapStyleSheet('css/style.css')">Default Style Sheet</button>
  17.  
  18.  
  19. REMEMBER TO EDIT THE CORRECT LOCATION OF THE STYLE SHEETS SUCH AS href="css/style.css"  AND ('css/style.css')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement