-2
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Eventos DOM</title>
<style>
div#area {
background: rgb(15, 116, 15);
font: normal 18pt arial;
color: white;
width: 200px;
height: 200px;
line-height: 200px;
text-align: center;
}
</style>
</head>
<body>
<div id='area' onclick="clicar()">
interaja...
</div>
<script>
function clicar() {
var a = window.document.querySelector('area').innerText = 'clicou'
}
</script>
</body>
</html>
when using onclick was to appear the option to click on Live Server. Can anyone find any error in the code? searched and nothing. Thanks, from now on!
Thanks, it worked out!
– Altair