ALGUEM ME AJUDA
POR FAVOR ALGUEM ME AJUDA A ACHAR ERROS NO MEU CODIGO. O PROBLEMA NELE É QUE EU FIZ UM JS PRA FAZER O ESTILO BACKGROUND COLOR MUDAR NO FUNDO DOS CLASS==BLOCOS OU CADA UM POR ID(A,B,C,D,E,F,G,H,I)... SE ALGUEM PUDER RESPONDER EU AGRADEÇO..
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<title>APP FOE</title>
<meta charset="utf-8">
<style type="text/css">
@import url('https://fonts.googleapis.com/css?family=Spectral+SC');
body {
background-image: url('https://i.pinimg.com/originals/76/36/5e/76365e38703aa2d2d9cfd3210ebb6d75.jpg');
background-size: 100%
}
#bloco {
width: 1000px;
display: block;
margin: 100px auto 0 auto;
}
.blocos {
background-color: rgba(141, 80, 80,.875);
border-radius: 4px;
margin: 10px;
padding-top: 5px;
padding-bottom: 5px;
width: 300px;
text-align: center;
color: black;
font-weight: 900;
font-family: 'Spectral SC';
font-size: 14px;
}
.linha {
display: inline-block;
}
button {
padding: 3px;
margin: 3px 0 5px 0;
background-color: rgba(0,0,0,.8);
color: white;
border: none;
padding: 5px 12px;
}
h2{
margin: 5px 0 0 0 ;
}
</style>
<script type="text/javascript">
var a , b , c , d , e , f , g , h , i;
a = 0 ; b = 0 ; c = 0 ; d = 0 ; e = 0 ; f = 0 ; g = 0 ; h = 0 ; i = 0 ;
function a () {
if (a==0) {
a=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
a=0;
document.getElementById('').style.backgroundColor = 'rgba(141, 80, 80,.875)';
}
}
function b () {
if (b==0) {
b=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
b=0;
document.getElementById('').style.backgroundColor = 'rgba(141, 80, 80,.875)';
}
}
function c () {
if (c==0) {
c=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
c=0;
document.getElementById('').style.backgroundColor = 'rgba(141, 80, 80,.875)';
}
}
function d () {
if (d==0) {
d=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
d=0;
document.getElementById('').style.backgroundColor = 'rgba(141, 80, 80,.875)';
}
}
function e () {
if (e==0) {
e=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
e=0;
document.getElementById('').style.backgroundColor = 'rgba(141, 80, 80,.875)';
}
}
function f () {
if (f==0) {
f=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
f=0;
document.getElementById('').style.backgroundColor = 'rgba(141, 80, 80,.875)';
}
}
function g () {
if (g==0) {
g=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
g=0;
document.getElementById('').style.backgroundColor = 'rgba(141, 80, 80,.875)';
}
}
function h () {
if (h==0) {
h=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
h=0;
document.getElementById('').style.backgroundColor = 'rgba(141, 80, 80,.875)';
}
}
function i () {
if (i==0) {
i=1;
document.getElementById('').style.backgroundColor = 'rgba(81, 112, 78,.875)';
} else {
i=0;
}
}
</script>
</head>
<body>
<div id="bloco">
<div class="linha">
<div class="blocos" id="a"><h2> ARVAHALL </h2> <button onclick="a()">CLICK!</button> </div>
<div class="blocos" id="b"><h2> BRISGARD </h2> <button onclick="b()">CLICK!</button> </div>
<div class="blocos" id="c"><h2> CIRGARD </h2> <button onclick="c()">CLICK!</button> </div>
</div>
<div class="linha">
<div class="blocos" id="d"><h2> DINEGU </h2> <button onclick="d()">CLICK!</button> </div>
<div class="blocos" id="e"><h2> EAST-NAGACH </h2> <button onclick="e()">CLICK!</button> </div>
<div class="blocos" id="f"><h2> FEL DRANGHYR </h2> <button onclick="f()">CLICK!</button> </div>
</div>
<div class="linha">
<div class="blocos" id="g"><h2> GREIFENTAL </h2> <button onclick="g()">CLICK!</button> </div>
<div class="blocos" id="h"><h2> HOUNDSMOOR </h2> <button onclick="h()">CLICK!</button> </div>
<div class="blocos" id="i"><h2> JAIMS </h2> <button onclick="i()" >CLICK!</button> </div>
</div>
</div>
</body>
</html>Discussão (1)
Carregando comentários...