效果图
代码
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<script src="Js/jquery.js"></script>
<style>
#c1{
background-color: aqua;
width: 200px;
height: 100px;
}
.color{
background-color: red;
width: 200px;
height: 100px;
}
</style>
<body>
<div id="c1"></div>
</body>
<script>
$(function(){
$("#c1").on("click", function(){
$("#c1").css("background-color","red");
})
})
</script>
</html>