-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
27 lines (20 loc) · 778 Bytes
/
index.html
File metadata and controls
27 lines (20 loc) · 778 Bytes
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
<html>
<head>
<title>VAT Validator</title>
</head>
<body>
<div style="margin: 10px 0px;" id="msg"></div>
<input id="vat" value="BE 0821.420.051" /><button id="checkbutton">Check me !</button>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="vatvalidator.js"></script>
<script>
var validator = new VatValidator();
$(window).ready(function() {
$("#checkbutton").on('click', function(){ $("#msg").html("Submit number. Please wait..."); validator.validate($("#vat").val(),callback); });
});
function callback(valid) {
$("#msg").html($("#vat").val() + " is "+(valid ? "" : " NOT ")+" valid");
}
</script>
</body>
</html>