-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
56 lines (48 loc) · 1.96 KB
/
index.html
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
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Página de Pagamento</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Pagamento</h1>
<label for="valor">Valor:</label>
<input type="number" id="valor" placeholder="Digite o valor" required>
<p id="mensagem-erro" class="erro"></p>
<h2>Forma de Pagamento</h2>
<label>
<input type="radio" name="pagamento" value="pix"> Pix
</label>
<label>
<input type="radio" name="pagamento" value="cartao"> Cartão de Crédito
</label>
<button id="informar-dados">Informar Dados</button>
<div id="pix-panel" class="painel oculto">
<h3>Pagamento via Pix</h3>
<p>Total com 10% de desconto: <span id="valor-pix"></span></p>
</div>
<div id="cartao-panel" class="painel oculto">
<h3>Pagamento com Cartão</h3>
<label for="numero-cartao">Número do Cartão:</label>
<input type="text" id="numero-cartao" placeholder="Digite o número do cartão">
<p id="bandeira-cartao"></p>
<p id="erro-cartao" class="erro"></p>
<label for="parcelas">Parcelas:</label>
<select id="parcelas">
<option value="1">1x sem juros</option>
<option value="2">2x sem juros</option>
<option value="3">3x sem juros</option>
<option value="4">4x com 5% de juros</option>
<option value="5">5x com 10% de juros</option>
</select>
<p>Total: <span id="valor-final"></span></p>
</div>
<button id="pagar">Pagar</button>
<p id="mensagem-sucesso" class="sucesso oculto">Pagamento realizado com sucesso!</p>
</div>
<script src="script.js"></script>
</body>
</html>