-
Notifications
You must be signed in to change notification settings - Fork 0
/
valid.html
executable file
·37 lines (29 loc) · 971 Bytes
/
valid.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<script type="text/javascript" src="js/plugins/Valid/Valid.mtform.config.js" ></script>
<script type="text/javascript" src="js/plugins/Valid/Valid.mtform.rules.js" ></script>
<script type="text/javascript" src="js/plugins/Valid/Valid.mtform.js" ></script>
<title>Javascript AJAX Request</title>
</head>
<body>
<form id='f' action="" type="POST">
<input name="name" type="text"/>
<input name="email" type="text"/>
<input name="submit" value="Send" type="submit" type="text"/>
</form>
<div class="message" style="padding: 25px; color: #777;"></div>
<script type="text/javascript">
window.onload = function(){
var form = document.getElementById("f");
var Valid = new MTF_Valid();
form.addEventListener("submit", function(event){
if( Valid.IsOK() )
{
}
});
}
</script>
</body>
</html>