提交 | 用户 | 时间
|
58d006
|
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
A |
2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 |
<head> |
|
4 |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> |
|
5 |
<title>Test for jQuery validate() plugin</title> |
|
6 |
|
|
7 |
<link rel="stylesheet" type="text/css" media="screen" href="../demo/css/screen.css" /> |
|
8 |
<link rel="stylesheet" href="../../../themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> |
|
9 |
|
|
10 |
<script src="../lib/jquery.js" type="text/javascript"></script> |
|
11 |
<script src="../../../ui/current/ui.tabs.js" type="text/javascript"></script> |
|
12 |
<script type="text/javascript" src="../lib/jquery.metadata.js"></script> |
|
13 |
<script type="text/javascript" src="../jquery.validate.js"></script> |
|
14 |
<script src="firebug/firebug.js" type="text/javascript"></script> |
|
15 |
|
|
16 |
<script type="text/javascript"> |
|
17 |
|
|
18 |
$().ready(function() { |
|
19 |
$("#commentForm").validate({debug:true}); |
|
20 |
$("#example > ul").tabs(); |
|
21 |
}); |
|
22 |
</script> |
|
23 |
|
|
24 |
<style type="text/css"> |
|
25 |
form.cmxform { width: 470px; } |
|
26 |
</style> |
|
27 |
|
|
28 |
</head> |
|
29 |
<body> |
|
30 |
|
|
31 |
<form class="cmxform" id="commentForm" method="get" action=""> |
|
32 |
|
|
33 |
<div id="example" class="flora"> |
|
34 |
<ul> |
|
35 |
|
|
36 |
<li><a href="#fragment-1"><span>One</span></a></li> |
|
37 |
<li><a href="#fragment-2"><span>Two</span></a></li> |
|
38 |
<li><a href="#fragment-3"><span>Three</span></a></li> |
|
39 |
</ul> |
|
40 |
<div id="fragment-1"> |
|
41 |
<fieldset> |
|
42 |
<legend>A simple comment form with submit validation and default messages</legend> |
|
43 |
<p> |
|
44 |
<label for="cname">Name (required, at least 2 characters)</label> |
|
45 |
<input id="cname" name="name" class="some other styles {required:true,minLength:2}" /> |
|
46 |
<p> |
|
47 |
<label for="cemail">E-Mail (required)</label> |
|
48 |
<input id="cemail" name="email" class="{required:true,email:true}" /> |
|
49 |
</p> |
|
50 |
<p> |
|
51 |
<label for="curl">URL (optional)</label> |
|
52 |
<input id="curl" name="url" class="{url:true}" value="" /> |
|
53 |
</p> |
|
54 |
<p> |
|
55 |
<label for="ccomment">Your comment (required)</label> |
|
56 |
<textarea id="ccomment" name="comment" class="{required:true}"></textarea> |
|
57 |
</p> |
|
58 |
</fieldset> |
|
59 |
|
|
60 |
</div> |
|
61 |
<div id="fragment-2"> |
|
62 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. |
|
63 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. |
|
64 |
</div> |
|
65 |
<div id="fragment-3"> |
|
66 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. |
|
67 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. |
|
68 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. |
|
69 |
</div> |
|
70 |
</div> |
|
71 |
<p> |
|
72 |
<input class="submit" type="submit" value="Submit"/> |
|
73 |
</p> |
|
74 |
|
|
75 |
</form> |
|
76 |
|
|
77 |
</body> |
|
78 |
</html> |