-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
49 lines (42 loc) · 955 Bytes
/
index.php
File metadata and controls
49 lines (42 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<title>Carro</title>
</head>
<body>
<h1 id='titulo'>Carro 1</h1>
<div style="background-color: green">
<?php
require "Carro.php";
$c = new Carro(50,15000);
$c->abastecer(50);
$c->andar(10);
$c->andar(10);
$c->andar(10);
?>
</div>
<div style="background-color: yellow">
<h1>Carro 2</h1>
<?php
$c2 = new Carro(30,0);
$c2->abastecer(30);
$c2->andar(10);
$c2->andar(10);
$c2->andar(10);
?>
</div>
<div style="background-color: green">
<h3>Carro 1</h3>
<?php
$c->andar(10);
?>
</div>
<br>
<button onClick="botao()">Botão</button>
</body>
<script>
function botao(){
document.getElementById('titulo').innerHTML = 'Novo Titulo'
}
</script>
</html>