-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExample-2.html
More file actions
40 lines (34 loc) · 1.01 KB
/
Example-2.html
File metadata and controls
40 lines (34 loc) · 1.01 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
<!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-2.js"></script>
</head>
<body>
<form id="form">
<label for="numeric ">Numeric</label>
<input type="text" name="numeric1" id="numeric1" placeholder="numeric (10 ~ 100)" />
<input type="submit" value="Enter" />
</form>
<script language="javascript">
(function() {
var limit10 = new JsNumeric({
target: document.getElementById("numeric1"),
callback: function(sender, globalValue, limit){
alert("Error input number. Please try again!");
},
limit: {
max: 100,
min: 10
}
});
})();
</script>
</body>
</html>