forked from yuri2peter/win10-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
child.html
43 lines (43 loc) · 1.22 KB
/
child.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>子页测试</title>
<script src="./js/jquery-2.2.4.min.js"></script>
<script src="./js/win10.child.js"></script>
<style>
.btn{
margin: 20px;
width: 160px;
height: 40px;
line-height: 40px;
font-size: 16px;
color: white;
background-color: #2D93CA;
border-radius: 3px;
transition: all 0.5s;
cursor: pointer;
text-align: center;
}
.btn:hover{
background-color: #256d95;
}
</style>
<script>
function f1() {
Win10_child.newMsg('子页的问候','这是从iframe页调用APi发送的消息哦');
}
function f2() {
Win10_child.openUrl('http://win10ui.yuri2.cn','<img class=\'icon\' src=\'./img/icon/win10.png\'/>Win10-UI官网')
}
function f3() {
Win10_child.close();
}
</script>
</head>
<body>
<div class="btn" onclick="f1()">子页给父页发消息</div>
<div class="btn" onclick="f2()">子页打开子窗口</div>
<div class="btn" onclick="f3()">关闭子页</div>
</body>
</html>