Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var cpt=1;
- function bo() {
- cpt=cpt+1;
- console.log(cpt);
- if (cpt>1)
- {
- console.log("changement de theme")
- swapStyleSheet('css/PageCss2.css')
- document.getElementById('logo').setAttribute('src', 'jour.jpg');
- console.log(cpt)
- cpt=0
- }
- else
- {
- swapStyleSheet('css/page.css')
- document.getElementById('logo').setAttribute('src', 'nuit.jpg');
- }
- }
- </script>
- <button id="bouton" onclick="bo()"><img src="nuit.jpg" id="logo"/></button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement