forked from anandgorantala/Form-Savior
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (50 loc) · 1.55 KB
/
index.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Form Savior Example</title>
<meta name="description" content="jQuery plugin to prompt save of unsaved changes in form">
<meta name="author" content="Anand Gorantala">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="jquery.formSavior.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#personInfo").formSavior({
'msg' : 'User information changes have not been saved.'
});
});
</script>
<style type="text/css">
* { font-family:Arial, Helvetica, sans-serif; }
ol { padding:0; font-size:0.8em; }
li { list-style:none;padding:0.5em 0; }
label{ display:block; float:left; width:100px; }
footer { clear:both;float:right; }
</style>
</head>
<body>
<form name="personInfo" id="personInfo" method="post">
<fieldset>
<legend>User Information</legend>
<ol>
<li>
<label for="name">Name</label>
<input name="name" id="name" type="text" value="Anand" />
</li>
<li>
<label for="address">Address</label>
<textarea name="address" id="address"></textarea>
</li>
<li>
<input type="submit" value="Save" />
</li>
</ol>
</fieldset>
</form>
<br><br>
<span class="hint"><b>Hint: </b> Enter any input and try to refresh or hit the back button or navigate away from the page using the address bar</span>
<footer>
<a href="http://arrowconcept.com">Arrowconcept.com</a>
</footer>
</body>
</html>