-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
120 lines (81 loc) · 3.06 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>MISSION FAILED</title>
<style>
.chars{
border: none;
border-color: transparent;
background: transparent;
}
.num{
border: none;
border-color: transparent;
background: transparent;
width: 15px;
}
#textboxs{
margin-top: 300px;
}
body{
background-color: whitesmoke;
}
p{
margin-top: 30px;
font: arial;
font-family: sans-serif;
font-size: 13px;
color: dimgrey;
}
</style>
<script>
function in_lenght(){
document.getElementById("chars-in").value = 20 - document.getElementById("in").value.length + " Caracteres restantes";
}
function out_lenght(){
document.getElementById("chars-out").value = 20 - document.getElementById("out").value.length + " Caracteres restantes";
}
function iniciar(){
var input = document.getElementById("in").value;
var output = document.getElementById("out").value;
if (input.length <= 0 || output.length <= 0){
alert("Preencha os campos!");
}else if(input.length < 10 && output.length < 10){
alert("Digite no minimo 10 caracteres em pelo menos 1 dos campos campos!");
}else{
sessionStorage._input = input;
sessionStorage._output = output;
window.location = 'script.html';
}
}
</script>
</head>
<body>
<div id="textboxs">
<div align="center">
<input type="text" class="num" value="1º" disabled>
<input type="text" id="in" maxlength="20" onkeyup="in_lenght()">
<input type="text" class="chars" id="chars-in" value="20 Caracteres restantes" disabled>
</div>
<br>
<div align="center">
<input type="text" class="num" value="2º" disabled>
<input type="text" id="out" maxlength="20" onkeyup="out_lenght()">
<input type="text" class="chars" id="chars-out" value="20 Caracteres restantes" disabled>
</div>
<div align="center">
<p>Acentos nâo funcionam!</p>
</div>
<div align="center">
<input type="button" id="btn" value="Iniciar" onclick="iniciar()">
</div>
</div>
</body>
<script>
document.getElementById("in").value = "MISSION FAILED";
document.getElementById("out").value = "TIME PARADOX";
in_lenght();
out_lenght();
</script>
</html>