-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path判断是否是微信内.html
43 lines (39 loc) · 1.21 KB
/
判断是否是微信内.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>
<head>
<meta charset="utf-8">
<title>test</title>
<meta name="viewport" content="width=750, user-scalable=no">
<link rel="stylesheet" href="/e_css/index/2018/global.css">
<script src="/e_js/index/2018/jquery.min.js" charset="utf-8"></script>
<style>
a{
font-size: 36px;
line-height: 40px;
}
</style>
</head>
<body>
<a href="https://gaokao.eol.cn" class="eol_jlink" data-link="http://www.eol.cn">链接地址</a>
<script type="text/javascript">
var is_weixin = (function() {
return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
})();
if (is_weixin) {
$('.eol_jlink').each(function(index, el) {
$(el).attr('href', $(el).attr('data-link'));
});
}
</script>
<!-- <script type="text/javascript">
var is_weixin = (function() {
return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
})();
if (is_weixin) {
window.location.href = "https://www.eol.cn";
} else {
window.location.href = "https://gaokao.eol.cn";
}
</script> -->
</body>
</html>