1
I have knowledge in HTML and CSS intermediate and am studying Javascript.
I can change the background of the body with event OnClick()
usually only once.
I wanted me to click again he’d switch to another color
<!DOCTYPE html>
<html>
<head>
<title>teste</title>
</head>
<body id="trocar" onClick="mudarCor()">
<p>
teste<br>
teste<br>
teste<br>
teste<br>
teste<br>
teste<br>
teste<br>
teste<br>
teste<br>
teste<br>
teste<br>
teste<br>
</p>
<script type="text/javascript">
function mudarCor(){
document.getElementById('trocar').style.backgroundColor = "blue"
}
</script>
</body>
</html>
I believe it’s a simple thing I’m not getting
That part of Math I haven’t studied yet... I tried using a list/array...tried the for command, but it didn’t work.. or I knew how to use it?
– Soreze martins