Your Cart

Get Amazing Offers on Scripts

Get UX Support

checked checkbox changes background color

<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
label {
	margin:0px 2px 4px 2px;	
	padding: 1px;
	background-color: #eee;
	display: block;
	width: 50px;
.map-box {
padding: 20px;

.map-box-active {
padding: 20px;


<form action="" method="get">

<label title="REQ13" id="REQ13"><input type="checkbox" value="checkbox" onchange="statecheck('REQ13')" />AL</label>
<label title="REQ14" id="REQ14"><input type="checkbox" value="checkbox" onchange="statecheck('REQ14')" />AK</label>
<label title="REQ15" id="REQ15"><input type="checkbox" value="checkbox" onchange="statecheck('REQ15')" />AS</label>

function statecheck(layer) {
	var myLayer = document.getElementById(layer);
    var input = myLayer.childNodes[0];
	if(input.checked == true){
		} else {

Leave a Reply
Free Worldwide shipping

On all orders above $50

Easy 30 days returns

30 days money back guarantee

International Warranty

Offered in the country of usage

100% Secure Checkout

PayPal / MasterCard / Visa