-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-setting.html
68 lines (64 loc) · 2.42 KB
/
test-setting.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<script type="text/javascript">
var pageWidth = 750;
if (/Android (\d+\.\d+)/.test(navigator.userAgent)) {
var version = parseFloat(RegExp.$1);
if (version > 2.3) {
var phoneScale = parseInt(window.screen.width) / pageWidth;
var mtinfo = '<meta name="viewport" content="width=' + pageWidth + ', minimum-scale = ' + phoneScale + ', maximum-scale = ' + phoneScale + ', target-densitydpi=device-dpi">'
document.write(mtinfo);
} else {
document.write('<meta name="viewport" content="width=' + pageWidth + ', target-densitydpi=device-dpi">');
}
} else {
document.write('<meta name="viewport" content="width=' + pageWidth + ', user-scalable=no, target-densitydpi=device-dpi">');
}
</script>
<title>设置</title>
<!--<meta name="msapplication-tap-highlight" content="no">-->
<meta name = "format-detection" content="telephone = no" />
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<style>
.big-size {
font-size: 40px;
}
</style>
</head>
<body>
<p class="big-size">开启ajax-watcher</p>
<div><span class="big-size">调试持续时间:</span> <input class="big-size J-keepingTime" type="text" value='5'> <span class="big-size">分钟</span></div>
<div><span class="big-size">自动显示:</span> <input class="J-autoShow" style="display: inline-block; width: 60px; height: 60px;" type="checkbox" checked></div>
<button class="test-open" style="
display: block;
height: 100px;
width: 100px;
margin-top: 10px;
">开启</button>
<button class="test-close" style="
display: block;
height: 100px;
width: 100px;
margin-top: 10px;
">关闭</button>
<script src="/jquery-3.2.1.min.js"></script>
<script src="/ajax-watcher.js"></script>
<script>
$('button.test-open').on('click', function () {
ajaxWatcher.open({
keepingTime: 1000 * 60 * parseFloat($('input.J-keepingTime').val()),
autoShow: $('input.J-autoShow')[0].checked
});
alert('开启成功');
});
$('button.test-close').on('click', function () {
ajaxWatcher.close();
alert('关闭成功');
});
</script>
</body>
</html>