Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- THIS GOES IN YOUR HEAD TAGS
- <link id="pagestyle" rel="stylesheet" href="css/style.css" type="text/css" />
- <script>
- function swapStyleSheet(sheet){
- document.getElementById('pagestyle').setAttribute('href', sheet);
- }
- </script>
- THIS GOES IN YOUR BODY SOMEWHERE
- <button onclick="swapStyleSheet('css/style1.css')">Green Style Sheet</button>
- <button onclick="swapStyleSheet('css/style2.css')">Blue Style Sheet</button>
- <button onclick="swapStyleSheet('css/style.css')">Default Style Sheet</button>
- 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