Untitled
unknown
javascript
3 years ago
638 B
15
Indexable
function random_bg_color() {
// Get a random number between 64 to 256
// (for getting lighter colors)
let red = Math.floor(Math.random() * 256) + 64;
let green = Math.floor(Math.random() * 256) + 64;
let blue = Math.floor(Math.random() * 256) + 64;
// Construct a color with the given values
let bgColor = "rgb(" + red + ", " + green + ", " + blue + ")";
// Set the background to the new color
document.body.style.background = bgColor;
}
// Function to reset all values to their default
function resetValues() {
curr_time.textContent = "00:00";
total_duration.textContent = "00:00";
seek_slider.value = 0;
}Editor is loading...