javascript change color of button
document.getElementById("button").style.background='#000000';
javascript change color of button
document.getElementById("button").style.background='#000000';
how to change background color using js
var warning = document.getElementById("warning");
warning.style.background-color = "red";
change background color on button click in javascript
<style>
.bg1 {
background-color: red;
}
</style>
<button id="btnChangebgColor" />
<script>
$(document).ready(function(){
$("#btnChangebgColor").click(function() {
$(this).addClass(".bg1");
});
}
</script>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us