-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
120 lines (115 loc) · 4.27 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta content="ie=edge" http-equiv="X-UA-Compatible">
<title>
alwaysDemo
</title>
<script src="./node_modules/amfe-flexible/index.js"></script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link href="./exercises/src/css/test.css" rel="stylesheet" />
<link rel="stylesheet" href="./exercises/dist/rem/style.css" />
<!-- <script src="http://pay.ehaier.com/paycenter/pay/request.html?callback=testJsonp&orderSn='D3534369025'&num=2&channel='sg'&payType='ceb_fenqi'&callbackUrl='v3/h5/pay/callback.html'&memberId=24482837&cfgMark=435"></script> -->
</head>
<style>
body {
padding: 20px 17px 80px 17px;
}
</style>
<body>
<div style="width: 300px;background-color: aquamarine;position: relative;">
<div style="width:30%;border:1px solid;display: inline-block;">
<div style="height: 300px;">
<div>
左面文字
</div>
</div>
</div>
<div style="width:30%;border:1px solid;display: inline-block;position: absolute;bottom: 0;top:0;">
<div style="height:100%;display: flex;align-items: center;justify-content: center;">
<div>
右面文字
</div>
</div>
</div>
</div>
<form>
<fieldset>
<legend>
健康信息
</legend>
身高:
<input type="text" /> 体重:
<input type="text" />
</fieldset>
</form>
<div id="container" style="overflow:auto">
<div class="left">定宽</div>
<div class="center">自适应</div>
<div class="right">定宽</div>
</div>
<button onclick="openVc()">打开vconsole</button>
<button onclick="closeVc()">关闭vconsole</button>
<div class="test-rem"></div>
<hr />
<span>这是一段仅供复制的文字</span><button id="copyBtn" data-clipboard-text="这是一段仅供复制的文字">复制</button>
<div>
<button onClick="testShare()">点击测试web share api</button>
</div>
<script src="./node_modules/vconsole/dist/vconsole.min.js"></script>
<!-- <script src="./exercises/dist/all.js"></script> -->
<script src="./lib/clipboard/dist/clipboard.min.js"></script>
<script>
var vConsole = new VConsole();
function openVc() {
vConsole.showSwitch();
}
function closeVc() {
vConsole.hideSwitch();
}
</script>
<script>
// const expressionInTest = "{()}{}[]";
// isBalanced 方法在exOne.js中,引入可直接使用
// console.log('跨文件方法:', isBalanced(expressionInTest));
// function isBalanced(str) {
// console.log('文件内isBalanced方法会覆盖其他文件', str);
// return str;
// }
console.log('clientWidth:', document.documentElement.clientWidth);
window.addEventListener('pageshow', function (event) {
console.log('pageshow:');
console.log(event);
});
</script>
<script src="./exercises/src/js/test.js"></script>
<script src="./exercises/src/js/exThree.js"></script>
<script src="./exercises/src/js/getIP.js"></script>
<script src="./exercises/src/js/analytics.js"></script>
<script>
if (navigator.getBattery) {
navigator.getBattery().then(function (res) {
console.log('设备电量', res.level * 100)
})
}
function testShare() {
if (navigator.share) {
navigator.share({
title: 'WebShare API Demo',
url: 'https://peakj.github.io/',
text: '分享的内容质量决定传播的速度和广度'
}).then(() => {
console.log('Thanks for sharing!');
})
.catch(console.error);
} else {
// fallback don't support
console.log('不支持web share api')
}
}
</script>
</body>
</html>