tests
This commit is contained in:
parent
bc16e8a136
commit
f3c7b42511
@ -1 +1,35 @@
|
|||||||
<h1>Will be updated soon.</h1>
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>DON'T USE OR YOU WILL BE STUCK ON ONE BACKGROUND</title>
|
||||||
|
<script>
|
||||||
|
// Function to apply the background color on page load
|
||||||
|
function applySavedBackgroundColor() {
|
||||||
|
const savedColor = localStorage.getItem('backgroundColor');
|
||||||
|
if (savedColor) {
|
||||||
|
document.body.style.backgroundColor = savedColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to change the background color and save it
|
||||||
|
function changeBackgroundColor(color) {
|
||||||
|
document.body.style.backgroundColor = color;
|
||||||
|
localStorage.setItem('backgroundColor', color);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply the saved background color when the page loads
|
||||||
|
window.onload = applySavedBackgroundColor;
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2>Choose Background Color</h2>
|
||||||
|
<button onclick="changeBackgroundColor('lightblue')">Light Blue</button>
|
||||||
|
<button onclick="changeBackgroundColor('lightgreen')">Light Green</button>
|
||||||
|
<button onclick="changeBackgroundColor('lightcoral')">Light Coral</button>
|
||||||
|
<button onclick="changeBackgroundColor('white')">Reset</button>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user