What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-23 07:56:02
javascript change background color
// change background color for specific id .. function changebackground(){ document.getElementById('id').style.backgroundColor = 'green' ; } // change background color for whole body.. function changebackground(){ document.body.style.backgroundColor =... Add solution -
Javascript 2021-09-06 09:01:02
how to change div color with media query in javascript
function myFunction(x) { if (x.matches) { // If media query matches document.body.style.backgroundColor = "yellow"; } else { document.body.style.backgroundColor = "pink"; } } var x = window.matchMedia("(max-width: 7... Add solution -
Javascript 2021-08-30 17:41:01
apply css media query using js
function myFunction(x) { if (x.matches) { // If media query matches document.body.style.backgroundColor = "yellow"; } else { document.body.style.backgroundColor = "pink"; } } var x = window.matchMedia("(max-width: 7... Add solution -
Javascript 2021-08-28 23:05:01
change the body background color with javascript checkbox using
blue=document.getElementsByClassName("check1")[0] red=document.getElementsByClassName("check2")[0] yellow = document.getElementsByClassName("check3")[0] function colors(color) { document.body.style.backgroundColor = color... Add solution