-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
67 lines (54 loc) · 1.58 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
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div api-name='User/Login2' id="api-login" url="log321in.php" method="get">
<input type="text" api-param-name="username" value="dsadas" max="26">
<input type="password" api-param-name="password" value="dsadas" max="16">
<button api-event="clickSubmit" event-api-name="User/Login2">登陆</button>
</div>
<div api-name='User/Login2' id="api-login" url="login.php" method="get">
<input type="text" api-param-name="username" value="dsadas" max="26">
<input type="password" api-param-name="password" value="dsadas" max="16">
<button api-event="clickSubmit" event-api-name="User/Login2">登陆</button>
</div>
<script type="text/javascript">
window.onerror = function(){
console.log(arguments)
}
</script>
<script type="text/javascript" src='https://cdn.bootcss.com/jquery/1.12.3/jquery.js'></script>
<script type="text/javascript" src='./ApiRequest.js'></script>
<script type="text/javascript">
var success = function success(data , data2){
console.log(data)
console.log(data2)
alert('成功')
}
var error = function error(data , data2){
console.log(data)
console.log(data2)
alert('失败')
}
var ApiRequest = new ApiRequest({
User : {
Reg : {
url : 'login.ph2p',
rule : {
username : {max : 16 , min : 5 , name : '用户名'},
password : {max : 16 , min : 5 , name : '密码'}
}
}
}
} , {
url : 'http://test.tocurd.com/',
event : true,
success : success,
error : error
});
</script>
</body>
</html>