-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdado.php
More file actions
126 lines (110 loc) Β· 5.22 KB
/
Copy pathdado.php
File metadata and controls
126 lines (110 loc) Β· 5.22 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html lang="en">
<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">
<!-- bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<title>Dado</title>
</head>
<body>
<nav class="navbar navbar-expand-lg bg-dark">
<div class="container-fluid">
<a class="navbar-brand text-white" href="index.php">OTOPUS</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active text-white" aria-current="page" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active text-white" aria-current="page" href="ficha.php">Fichas</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="card text-center justify-content-center d-flex mt-3">
<div class="card-header bg-dark text-center text-white">Dados</div>
<div class="card-body">
<div class="form-group">
<label for="text0" class="col-form-label">D4</label>
<div class="">
<input id="d4" name="d4" type="text" class="form-control">
<button onclick="d4()" class="btn btn-dark mt-3">π²D4π²</button>
</div>
</div>
<div class="form-group">
<label for="text0" class="col-form-label mt-5">D6</label>
<div class="">
<input id="d6" name="d6" type="text" class="form-control">
<button onclick="d6()" class="btn btn-dark mt-3">π²D6π²</button>
</div>
</div>
<div class="form-group">
<label for="text0" class="col-form-label mt-5">D8</label>
<div class="">
<input id="d8" name="d8" type="text" class="form-control">
<button onclick="d8()" class="btn btn-dark mt-3">π²D8π²</button>
</div>
</div>
<div class="form-group">
<label for="text0" class="col-form-label mt-5">D10</label>
<div class="">
<input id="d10" name="d10" type="text" class="form-control">
<button onclick="d10()" class="btn btn-dark mt-3">π²D10π²</button>
</div>
</div>
<div class="form-group">
<label for="text0" class="col-form-label mt-5">D12</label>
<div class="">
<input id="d12" name="d12" type="text" class="form-control">
<button onclick="d12()" class="btn btn-dark mt-3">π²D12π²</button>
</div>
</div>
<div class="form-group">
<label for="text0" class="col-form-label mt-5">D20</label>
<div class="">
<input id="d20" name="d20" type="text" class="form-control">
<button onclick="d20()" class="btn btn-dark mt-3">π²D20π²</button>
</div>
</div>
<div class="form-group">
<label for="text0" class="col-form-label mt-5">D100</label>
<div class="">
<input id="d100" name="d100" type="text" class="form-control">
<button onclick="d100()" class="btn btn-dark mt-3">π²D100π²</button>
</div>
</div>
</div>
</div>
</div>
<script>
function d4() {
return document.getElementById('d4').value = Math.floor(Math.random() * 4) + 1;
}
function d6() {
return document.getElementById('d6').value = Math.floor(Math.random() * 6) + 1;
}
function d8() {
return document.getElementById('d8').value = Math.floor(Math.random() * 8) + 1;
}
function d10() {
return document.getElementById('d10').value = Math.floor(Math.random() * 10) + 1;
}
function d12() {
return document.getElementById('d12').value = Math.floor(Math.random() * 12) + 1;
}
function d20() {
return document.getElementById('d20').value = Math.floor(Math.random() * 20) + 1;
}
function d100() {
return document.getElementById('d100').value = Math.floor(Math.random() * 100) + 1;
}
</script>
</body>
</html>