html background toggle image changer
<button onclick="myFunction1()" style="background-color: white; padding: 2px; border: none;">Toggle light mode</button>
<style>
body{
background-color: white;
}
.dark-mode{
background-image: url("image.jpg");
color: white;
}
</style>
<script>
<script>
function myFunction1() {
var element = document.body;
element.classList.toggle("dark-mode");
}
</script>