PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/source/Plug-in/validator/test.html

http://prosporous.googlecode.com/
HTML | 79 lines | 79 code | 0 blank | 0 comment | 0 complexity | 4c01f54b8b2b91f489a20de2523c018a MD5 | raw file
 1<?xml version="1.0" encoding="gb2312"?>
 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 3<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
 4<head>
 5<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 6<meta http-equiv="Content-Language" content="zh-CN" />
 7<meta content="all" name="robots" />
 8<title>????? Validator v4.0 alpha preview</title>
 9<link href="css/validator.css" rel="stylesheet" type="text/css" />
10<script type="text/javascript" src="js/mootools.js" charset="gb2312"></script>
11<script type="text/javascript" src="js/full-validator.js" charset="gb2312"></script>
12<script type="text/javascript">
13/*<![CDATA[*/
14Validator.registerElement("ZipCodeElement", {
15	process : function(){
16		return /^[1-9]\d{5}$/.test(this.value);
17	}
18});
19Validator.setup({
20	form : 'demo',
21	configs : 'xml,attribute,tag',
22	warns : 'summary,follow, color,class, alert,tips',
23	color : {warn :'black', pass:'white'},
24	//xml : {url : 'rules/validation.xml?id=1'},
25	events : {
26		'Password' : {
27			onLevelChange : function(n){
28				$('passwordInfo').setStyle('background-position',  'left ' + [0, 22, 50, 75, 100][n] + '%');
29			}
30		}
31	}
32}).add({"for":"Password", "rule":"password",  "level":"2", "empty":"???????", "warn":"???????", "tips":"???6~16????????????????", "pass":"????"});
33/*]]>*/
34</script>
35</head>
36<body>
37	<div id="summary" class="summary"></div>
38	<form id="demo" method="get" action="" onsubmit="return false">
39		<fieldset>
40			<legend>
41				???? Validator v4.0 alpha
42			</legend>
43			<dl style="height:58px">
44				<dt>
45					<label for="Password">???</label>
46				</dt>
47				<dd>
48					<input id="Password" name="Password" type="text" value="abcdEfG123" />
49					<div id="passwordInfo"></div>
50				</dd>
51			</dl>
52			<dl>
53				<dt>
54					<label for="Password1">???</label>
55				</dt>
56				<dd>
57					<input id="Password1" name="Password1" type="text" value="abcdEfG123" /><ui:v for="Password1" rule="repeat" to="Password" empty="???????" warn="??????????" tips="???????????" pass="?????" />
58				</dd>
59			</dl>
60			<dl>
61				<dt>
62					<label for="Password2">???</label>
63				</dt>
64				<dd>
65					<input id="Password2" name="Password2" type="text" value="abcdEfG123" /><ui:v for="Password2" rule="compare" toElement="Password" as="String" empty="???????" warn="??????????" tips="???????????" pass="?????" />
66				</dd>
67			</dl>
68			<dl>
69				<dt>
70					???
71				</dt>
72				<dd>
73					<input name="Submit" type="submit" value="????" />
74				</dd>
75			</dl>
76		</fieldset>
77	</form>
78</body>
79</html>