-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkingindex.php
52 lines (47 loc) · 1.14 KB
/
workingindex.php
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
<?php
?>
<html>
<head>
<title>Testing the DAMN Keypad</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body onload="emptyCode();">
<script type="text/javascript">
function addCode(key){
var code = document.forms[0].code;
if(code.value.length < 4){
code.value = code.value + key;
}
}
function emptyCode(){
document.forms[0].code.value = "";
}
</script>
<table id="keypad" cellpadding="5" cellspacing="3">
<tr>
<td onclick="addCode('1');">1</td>
<td onclick="addCode('2');">2</td>
<td onclick="addCode('3');">3</td>
</tr>
<tr>
<td onclick="addCode('4');">4</td>
<td onclick="addCode('5');">5</td>
<td onclick="addCode('6');">6</td>
</tr>
<tr>
<td onclick="addCode('7');">7</td>
<td onclick="addCode('8');">8</td>
<td onclick="addCode('9');">9</td>
</tr>
<tr>
<td onclick="emptyCode();">*</td>
<td onclick="addCode('0');">0</td>
<td onclick="emptyCode();">#</td>
</tr>
</table>
<form action="keypad.php" method="post">
<input id="enter" type="submit" value="Enter" /><br />
<input type="text" name="code" value="" maxlength="4" class="display" readonly="readonly" />
</form>
</body>
</html>