Edit This Code:
See Result »
<
!DOCTYPE
html
>
<
html
>
<
body
>
<
p
>
Click anywhere in the document to change its background color.
<
/p
>
<
script
>
document.addEventListener(
"click"
,
function
(){
document.body.style.backgroundColor =
"red"
;
});
<
/script
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <body> <p>Click anywhere in the document to change its background color.</p> <script> document.addEventListener("click", function(){ document.body.style.backgroundColor = "red"; }); </script> </body> </html>
Result:
Privacy Policy