2018-09-03 14:59:53 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
|
<title>Document</title>
|
|
|
|
<script
|
|
|
|
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
|
|
|
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
|
|
|
crossorigin="anonymous"></script>
|
2018-10-04 22:22:01 +02:00
|
|
|
<script src="../dist/codice.fiscale.var.js"></script>
|
2018-09-03 14:59:53 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<form action="">
|
2018-10-04 22:22:01 +02:00
|
|
|
<input type="text" name="cf" id="cf" placeholder="name"><br>
|
2018-09-03 14:59:53 +02:00
|
|
|
</form>
|
2018-10-04 22:22:01 +02:00
|
|
|
<pre></pre>
|
|
|
|
<script>
|
|
|
|
$(function(){
|
|
|
|
$("#cf").change(function(){
|
|
|
|
var cf = new CodiceFiscale($(this).val());
|
|
|
|
$('pre').text(cf.toJSON());
|
|
|
|
|
|
|
|
});
|
|
|
|
})
|
|
|
|
</script>
|
2018-09-03 14:59:53 +02:00
|
|
|
</body>
|
|
|
|
</html>
|