-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
59 lines (56 loc) · 1.53 KB
/
test.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
<!DOCTYPE html>
<html lang="ch">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="http://js.loc.com:8081/scpo-webreq.js"></script>
<script>
function getTest() {
ScpoWR
.then(() => "hhhh + ")
.then(add => con.innerHTML += add + "success\n")
.fget("test.php", {hh: 123})
.then(data => data + "...And I'm coming!\n")
.then(md => con.innerHTML += md)
.fpost("test.php", "hh=123")
.then(data => con.innerHTML += data)
.fget("//tesmo")
.onerr(() => con.innerHTML += "faild\n")
.fget("//tesmo")
.then(
() => con.innerHTML += "success\n",
() => con.innerHTML += "faild\n"
)
.then(() => con.innerHTML += "you can't see me\n");
}
function postTest() {
var i, noList = {
"contentWindow": 1,
};
try {
con.innerHTML += ScpoWR.config;
}catch(e){con.innerHTML=i+"<br>"+e.message}
}
</script>
</head>
<body>
<iframe name="ifr" src="//loc.com:8081/js/script/scpo/webreq/test.php"></iframe>
<object id="testObj" data="//loc.com:8081/js/script/scpo/webreq/test.php"></object>
<pre id="con"></pre>
<form id="frmTest">
count:<br />
<input name="count" value="1" /><br />
commit:<br />
<input name="commit" value="good" /><br />
<div>
item[0]:<br />
<input name="item[0]" value="apple" /><br />
item[1]:<br />
<input name="item[1]" value="banana" /><br />
</div>
</form>
<button onclick="getTest()">GET</button>
<button onclick="postTest()">POST</button>
</body>
</html>