'Background color of the page when an alert is showing
I currently have the following code that makes a prompt show up when trying to access a page
<script>
var password = "1234";
if(prompt("Enter password:", "") !== password) window.location = "/";
</script>
What I want to know is if there is a way to change the background color of the page while the prompt is showing up:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
