-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathid_query.html
68 lines (63 loc) · 2.36 KB
/
id_query.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
<html>
<head>
<meta charset="utf-8">
<title>Untitled Page</title>
<style type="text/css">
input {
width: 100px;
height: 100px;
font-size: 24pt;
font-weight:bold;
}
td {text-align:center;}
#btnEnter{
width: 100px;
height: 320px;
}
</style>
<script language="javascript" type="text/javascript">
function btnEnter_onclick() {
var value = document.getElementById("txtNum").value;
alert(value);
}
function btnNum_onclick(i) {
txtNum.value=txtNum.value+i;
}
function clearText() {
document.getElementById("txtNum").value = "";
}
function delText() {
var value = document.getElementById("txtNum").value;
var str = value.substring(0,value.length-1);
document.getElementById("txtNum").value = str;
}
</script>
</head>
<body>
<input id="txtNum" type="text" style="width:300px;"/>
<table width="440" height="440" border="0" cellpadding="0" cellspacing="5" align="center">
<tr>
<td><input id="Button1" type="button" value="1" onclick="return btnNum_onclick(1)" /></td>
<td><input id="Button2" type="button" value="2" onclick="return btnNum_onclick(2)"/></td>
<td><input id="Button3" type="button" value="3" onclick="return btnNum_onclick(3)"/></td>
<td rowspan="3"><input id="btnEnter" type="button" value="查询" onclick="return btnEnter_onclick()" /></td>
</tr>
<tr>
<td><input id="Button4" type="button" value="4" onclick="return btnNum_onclick(4)"/></td>
<td><input id="Button5" type="button" value="5" onclick="return btnNum_onclick(5)"/></td>
<td><input id="Button6" type="button" value="6" onclick="return btnNum_onclick(6)"/></td>
</tr>
<tr>
<td><input id="Button7" type="button" value="7" onclick="return btnNum_onclick(7)"/></td>
<td><input id="Button8" type="button" value="8" onclick="return btnNum_onclick(8)"/></td>
<td><input id="Button9" type="button" value="9" onclick="return btnNum_onclick(9)"/></td>
</tr>
<tr>
<td><input id="Button0" type="button" value="0" onclick="return btnNum_onclick(0)" /></td>
<td><input id="Buttonx" type="button" value="X" onclick="return btnNum_onclick('X')"/></td>
<td><input id="ButtonDel" type="button" value="删除" onclick="return delText()"/></td>
<td><input id="ButtonClear" type="button" value="清空" onclick="return clearText()"/></td>
</tr>
</table>
</body>
</html>