-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExample.html
More file actions
39 lines (33 loc) · 1.49 KB
/
Example.html
File metadata and controls
39 lines (33 loc) · 1.49 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
<!DOCTYPE html>
<html>
<head>
<title>js-numeric by Rchockxm</title>
<meta charset="utf-8" />
<meta name="keywords" content="html5, javascript, jquery, css3" />
<meta name="description" content="input numeric limit" />
<meta name="author" content="rchockxm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="style.css" />
<script type="text/javascript" src="js-numeric.js"></script>
</head>
<body>
<script language="javascript">
var limit10 = function(sender, global_value, limit_number) {
alert("Error: number " + global_value + " cant over or less " + limit_number + "!!");
};
var limit100 = function(sender, global_value, limit_number) {
alert("Error: number " + global_value + " cant over or less " + limit_number + "!!");
};
var limit1000 = function(sender, global_value, limit_number) {
alert("Error: number " + global_value + " cant over or less " + limit_number + "!!");
};
</script>
<form id="form">
<label for="numeric ">Numeric</label>
<input type="text" name="numeric1" id="numeric1" placeholder="numeric (10)" onkeypress="return NumericLimits(this, 10, limit10);" />
<input type="text" name="numeric2" id="numeric2" placeholder="numeric (100)" onkeypress="return NumericLimits(this, 100, limit100);" />
<input type="text" name="numeric3" id="numeric3" placeholder="numeric (1000)" onkeypress="return NumericLimits(this, 1000, limit1000);" />
<input type="submit" value="Enter" />
</form>
</body>
</html>