Showing source for: https://www.speedtest.cn/
Duration: 1.478091s
Server: Tengine
<!-- 多条广告如下脚本只需引入一次 -->
<script type="text/javascript" src="//cpro.baidustatic.com/cpro/ui/cm.js" async="async" defer="defer">
</script>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Cache-Control" content="no-transform"/>
<meta name="theme-color" content="#1D2133">
<!-- CSRF Token -->
<meta name="csrf-token" content="">
<meta name="Description" content="测速网(SpeedTest.cn)提供网速测试,网络质量测试,宽带测速,Wi-Fi测速,5G测速,IPv6测速,带宽检测,路由器测速,网关测速,宽带提速,宽带升级,网络加速,内网测速,专网测速,视频测试,游戏测速,直播测速,网络诊断,蹭网检测,物联网监测,网站监测,API监测,Ping测试,路由测试等专业服务,拥有国内外大量高性能测试点,覆盖电信,移动,联通,网通,广电,长城宽带,鹏博士等运营商,Wi-Fi 7,Wi-Fi 6,FTTR。">
<meta name="Keywords" content="测速,测网速,网速,网络质量,5G网速,5G测速,5G网络,在线测速,网速测试,宽带测速,视频测试,Wi-Fi测速,联通,电信,移动,长城宽带,广电,鹏博士,网速诊断,网络诊断,蹭网检测,路由测试,上网速度,网页打开速度,游戏测速,直播测速,提高网速,宽带提速,网络加速,速度测试,带宽检测,宽带测试,千兆宽带,全屋Wi-Fi,双千兆,三千兆,光纤,ping,speedtest,speed,test,adsl,ftth,iot,internet,tracert,traceroute,IPv6,6G,网维助手,Wi-Fi 7,Wi-Fi 6,FTTR">
<meta http-equiv="x-dns-prefetch-control" content="on">
<meta name="format-detection" content="telephone=no,email=no,address=no">
<title>测速网 - 专业测网速, 网速测试, 宽带提速, 游戏测速, 直播测速, 5G测速, 物联网监测,Wi-Fi 7,Wi-Fi 6,FTTR - SpeedTest.cn</title>
<!-- Styles -->
<link rel="stylesheet" href="https://unpkg.zhimg.com/element-ui/lib/theme-chalk/index.css">
<link href="/css/app.css?id=3d46bee807f32028b529" rel="stylesheet">
<link rel="dns-prefetch" href="//forge.speedtest.cn">
<link rel="dns-prefetch" href="//plugin.speedtest.cn">
<link rel="dns-prefetch" href="//api-v3.speedtest.cn">
<link rel="dns-prefetch" href="//nodes.speedtest.cn">
<link rel="dns-prefetch" href="//tisu-api.speedtest.cn">
<link rel="dns-prefetch" href="//tisu-api-v3.speedtest.cn">
<link rel="dns-prefetch" href="//file2.speedtest.cn">
<link rel="dns-prefetch" href="//api-v3-ipv6.speedtest.cn">
<link rel="dns-prefetch" href="//vdata.amap.com">
<link rel="dns-prefetch" href="//cdn.jsdelivr.net">
<link rel="dns-prefetch" href="//cdn.bootcss.com">
<link rel="dns-prefetch" href="//unpkg.com">
<link rel="dns-prefetch" href="//code.jquery.com">
<link rel="dns-prefetch" href="//webapi.amap.com">
<link rel="shortcut icon" type="image/x-icon" href="/images/ico/favicon.ico"/>
<link rel="apple-touch-icon-precomposed" href="/images/ico/apple-touch-icon-precomposed.png">
<link rel="shortcut icon" href="/images/ico/favicon.png">
<link rel="stylesheet" href="https://file2.speedtest.cn/fonts/NotoSansSC/fonts.css">
<script src="https://turing.captcha.qcloud.com/TCaptcha.js"></script>
<meta name="360-site-verification" content="2ec83708e480ab5d7ad82f49b292be5d"/>
<meta name="sogou_site_verification" content="xuFzYGO0JN"/>
<script src="https://file2.speedtest.cn/js/[email protected]"></script>
<script src="https://file2.speedtest.cn/js/[email protected]"></script>
<script src="https://file2.speedtest.cn/js/jquery-3.4.1.min.js"></script>
<script src="https://file2.speedtest.cn/js/axios.min.js"></script>
<script src="https://file2.speedtest.cn/js/bootstrap.bundle.min.js"></script>
<script src="https://file2.speedtest.cn/js/MD5.js"></script>
<script src="https://file2.speedtest.cn/poi/poiList.js"></script>
<script>
window.ip = '';
window.forge_url = 'https://forge.speedtest.cn';
window.vpn_url = 'https://vpn-api.speedtest.cn';
window.portal_url = 'https://portal.speedtest.cn';
window.tisu_url = 'https://tisu-api.speedtest.cn';
window.mall_url = 'http://mall-api-test.speedtest.cn';
window.mall_page_url = 'https://mall.speedtest.cn';
window.wechat_url = 'https://wechat-api.speedtest.cn';
window.plugin_url = 'https://plugin.speedtest.cn';
window.fiveG_img = '5g-alert-ad';
window.nodes_url = 'https://nodes.speedtest.cn';
window.tisu_plugin_url = 'https://tisu-plugin.speedtest.cn';
window.basev3_url = 'https://api-v3.speedtest.cn';
window.bigdata_url = 'https://forge-bigdata.speedtest.cn';
window.app_url = 'https://www.speedtest.cn';
window.app_api_url = 'https://app-api.speedtest.cn';
window.pro_m_url = 'https://pro-m.speedtest.cn';
window.curve_url = window.location.href.indexOf('5g.speedtest.cn') === -1 ? 'https://www.speedtest.cn' : '';
window.tisu_url_v3 = 'https://tisu-api-v3.speedtest.cn';
window.to_b_url = 'https://b.speedtest.cn';
window.bigdata_real_url = 'https://bigdata-gateway.speedtest.cn';
window.bigdata_web_url = 'https://bigdata.speedtest.cn';
window.new_nodes_url = 'https://nodes-api.speedtest.cn';
</script>
</head>
<body class="web-body">
<iframe id="iframe" sandbox="allow-same-origin" style="display:none;"></iframe>
<main id="app">
<index-header
login_label="登录"
login_out_label="退出"
history_speed_label="测速记录"
user_center_label="账户管理"
forge_url="https://forge.speedtest.cn"
app_url="https://www.speedtest.cn"
url_5g="https://5g.speedtest.cn"
bigdata_url="https://bigdata.speedtest.cn"
tob_url="https://b.speedtest.cn"
portal_url="https://portal.speedtest.cn"
></index-header>
<section class="contentMinHeight section_wrap">
<div class="speed-home-warp">
<div class="speed-activity481-wrap speed-activity481-wrap-index">
<!-- 首页顶部左侧 -->
<div style="width: 34.375rem; height: 6.25rem;">
<pub-ad
position="index_top_left"
tencentid="u6368884"
all-type="1"
>
<div style="max-width: 1110px;width: 100%; height: 100%;margin: 0 auto;z-index: 9;text-align: center"
>
<!-- 首页头部横幅 -->
<div>
<ins class="adsbygoogle"
style="display:inline-block;width:100%;height:100%"
data-ad-client="ca-pub-3179016792556792"
data-ad-slot="1041011558"></ins>
</div>
</div>
</pub-ad>
</div>
<!-- 首页顶部右侧 -->
<!-- 要请求广告位 -->
<div style="width: 34.375rem; height: 6.25rem;">
<pub-ad
position="index_top_right"
tencentid="u6368885"
all-type="1"
>
<div style="max-width: 1110px;
width:100%;height:100%;margin: 0 auto;z-index: 9;text-align: center"
>
<!-- 首页头部横幅 -->
<div>
<ins class="adsbygoogle"
style="display:inline-block;width:100%;height:100%"
data-ad-client="ca-pub-3179016792556792"
data-ad-slot="7414848215"></ins>
</div>
</div>
</pub-ad>
</div>
</div>
<div class="speed-home-content">
<div class="vertisingSpace index-speedtest-content-box vertisingSpace-left">
<!-- 首页左侧 -->
<!-- 要请求广告位 -->
<pub-ad-left
>
</pub-ad-left>
</div>
<index-top-notice v-if="!$root.progressStatus"></index-top-notice>
<speedtest></speedtest>
<div class="vertisingSpace index-aavertising index-speedtest-content-box vertisingSpace-right">
<!-- 首页右侧 -->
<!-- 要请求广告位 -->
<div style="width: 10rem;height: 37.5rem;margin-left: auto">
<pub-ad
position="index_right"
gooconfig="0"
propsheight="600"
tencentid="u6368883"
all-type="1"
>
<div style="width: 100%;height: 100%;">
<ins class="adsbygoogle"
style="display: inline-block;width:100%;height:100%"
data-ad-client="ca-pub-3179016792556792"
data-ad-slot="3139422280"
></ins>
</div>
</pub-ad>
</div>
</div>
<div :class="`speed-bottom-activity ${$root.progressStatus===6?'speed-bottom-activity-finish':''}`">
<!-- 要请求广告位 -->
<div style="display:flex;width:34.375rem;height: 6.25rem;">
<div style="width: 17.1875rem;">
<pub-ad
position="index_bottom_item1"
propsheight="100"
all-type="1"
>
<div class="_lvx7bi6dooi"></div>
</pub-ad>
</div>
<div style="width: 17.1875rem;">
<pub-ad
position="index_bottom_item2"
propsheight="100"
all-type="1"
>
<div class="_lvx7bi6dooi"></div>
</pub-ad>
</div>
</div>
<!-- 首页表盘下方右边 -->
<!-- 要请求广告位 -->
<div style="display:flex;width:34.375rem;height: 6.25rem;">
<div style="width: 17.1875rem;">
<pub-ad
position="index_bottom_item3"
propsheight="100"
all-type="1"
>
<div class="_3cjh0hos215"></div>
</pub-ad>
</div>
<div style="width: 17.1875rem;">
<pub-ad
position="index_bottom_item4"
propsheight="100"
all-type="1"
>
<div class="_lvx7bi6dooi"></div>
</pub-ad>
</div>
</div>
</div>
</div>
<alert-5g-ad>
</alert-5g-ad>
</div>
<div class="wg">
<speedtest-data></speedtest-data>
<!-- 下方app下载-->
<speed-app
app-type="1"
></speed-app>
<ad-neighbors v-if='$root.progressStatus===6'
:position="'index_nearby_speed'"
:googleDataAdClient="'ca-pub-3179016792556792'"
:googleDataAdSlot="'9297749715'"
:baiduAdContainer="'u6911435'"
>
</ad-neighbors>
<!-- 测速结果-->
<speed-result v-if='false&&$root.progressStatus===6'></speed-result>
<!-- 网络Network -->
<div class="network-module">
<!-- 视频Video -->
<konw-ledge-link></konw-ledge-link>
<network-knowledge-swiper :five_gvideos="$root.indexWebData"></network-knowledge-swiper>
<div class="title" id='Network'><a href="https://5g.speedtest.cn/">5G就在你身边</a></div>
<div class="wgcard">
<map-com bigdata_url="https://bigdata.speedtest.cn"></map-com>
<div class="right">
<div class="right-top">
<div class="left-label">
<span class="tip">5G网速中值排行</span>
<span class="icon-info">
<span class="tip-infor">统计当前月份测速网用户5G网络测速数据(下载/上传)的网速中值,降序排列。</span>
</span>
</div>
<div class="right-link" style="white-space: nowrap" onClick='goToLink("https://bigdata.speedtest.cn")'>查看更多 >
</div>
</div>
<rank-5g></rank-5g>
</div>
</div>
</div>
<!-- -->
<video-player></video-player>
</div>
<div class="container">
<ad-neighbors v-if='$root.progressStatus!==6'
:position="'index_nearby_speed'"
:googleDataAdClient="'ca-pub-3179016792556792'"
:googleDataAdSlot="'9297749715'"
:baiduAdContainer="'u6911435'"
>
</ad-neighbors>
<!-- 便民工具 -->
<div class="toolbox">
<tools :isindex="true" :only="false" :advertising=false></tools>
</div>
<insight-com></insight-com>
</div>
<!-- 测速资讯 战略合作伙伴 -->
<sponsor :list="$root.indexWebData.sponsorList"></sponsor>
<div class="speed-twoads-wrap" style="margin-bottom:50px;">
<pub-ad portconfig="false" tencentid="u6368899">
<div style="max-width: 1110px;
width: 550px; height: 90px;margin: 0 auto;z-index: 9;text-align: center"
>
<!-- 首页底部1 550*90 -->
<ins class="adsbygoogle"
style="display:inline-block;width:550px;height:90px"
data-ad-client="ca-pub-3179016792556792"
data-ad-slot="2150110911"></ins>
</div>
</pub-ad>
<pub-ad portconfig="false" tencentid="u6368901">
<div style="max-width: 1110px;
width: 550px; height: 90px;margin: 0 auto;z-index: 9;text-align: center"
>
<!-- 首页底部2 550*90 -->
<ins class="adsbygoogle"
style="display:inline-block;width:550px;height:90px"
data-ad-client="ca-pub-3179016792556792"
data-ad-slot="6246296263"></ins>
</div>
</pub-ad>
</div>
</section>
<!-- Copyright Footer -->
<footer class="footer-container">
<div class="container site-footer">
<div class="site-nav">
<div class="site-nav-navbar">
<a class="navbar-brand" href="/">
<img src="/images/footerlogo.svg" alt="">
</a>
<ul class="site-footer-ul">
<li class="nav-item">
<a class="nav-link" href="/nodes">添加测速节点</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/recruit">加入我们</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">关于我们</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/ads">广告合作</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/bandwidth">网速知识</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/terms">用户协议</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/privacy">隐私政策</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/app">Apps</a>
</li>
</ul>
</div>
<div class="site-bottom">
<div class="records">
<div>
<p>商务合作:<a href="mailto:[email protected]">[email protected]</a></p>
<p>广告合作:<a href="mailto:[email protected]">[email protected]</a></p>
</div>
<div class="puton-top">
<p>
<a style="color:#818286;" target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index">
苏ICP备2022046154号-2 |
</a><a style="color:#818286;" target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index">苏B2-20230256</a>
</p>
</div>
<div class="puton-top">
<p><a class="records-alink" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=32010402001434" target="_blank"><img
src="../../images/jh.png" alt="jh">苏公网安备 32010402001434号</a></p>
</div>
<div class="puton-top">
<p>版权所有:测速网技术(南京)有限公司</p>
</div>
</div>
<div class="site-code-wrap">
<div class="site-code">
<div><img src="/images/qr-code-wechat.png" alt="code"></div>
<p>关注微信公众号</p>
</div>
<div class="site-code">
<div><img src="/images/qr-video.png" alt="code"></div>
<p>关注视频号</p>
</div>
<div class="site-code">
<div><img src="/images/qr-code-trill.png" alt="code"></div>
<p>关注抖音</p>
</div>
</div>
</div>
</div>
</div>
</footer>
<!-- End Copyright Footer -->
<!-- End Copyright Footer -->
<Login v-if="loginShow"></Login>
<download-app-speed v-if="downloadApp"></download-app-speed>
<download-app-v2 v-if="$root.showAppDownloadv2"></download-app-v2>
<action-rank v-if="actionShow"></action-rank>
<suspension-window></suspension-window>
<accelerate-loading
v-if="$root.accelerateLoadingSwitch||$root.keepAccelerateLoadingSwitch"></accelerate-loading>
<!--下线宽带提速弹窗-->
<tape-out-alert v-if="$root.showTapeOutAlert"></tape-out-alert>
<jiasu-go-speed v-if="$root.showSpeedtest"></jiasu-go-speed>
<jiasu2-go-speed v-if="$root.showJiasuSpeedtest"></jiasu2-go-speed>
<speed-after-alert v-if="$root.showSpeedAfterAlert"></speed-after-alert>
<!-- 小程序测速pk提现活动弹窗 -->
<wechat-pk-activity-alert v-if="$root.showMiniProgramPkAlert"></wechat-pk-activity-alert>
<!-- 推荐分成弹窗 -->
<tips-alert v-if="$root.tipsAlertSwitch">
</tips-alert>
<!-- 下载app的弹窗 -->
<download-app></download-app>
<!-- 下载客户端的弹窗 -->
<tips-download-other v-if="$root.tipsDownload"></tips-download-other>
<app-jisu-alert v-if="$root.jisuAppDownload"></app-jisu-alert>
<!--测速结束之后的信息收集弹窗-->
<chu-zhou-pop v-if="$root.isChuZhouPopShow"></chu-zhou-pop>
<wu-xi-pop v-if="$root.isShowWuXiPop"></wu-xi-pop>
<new-people-pop v-if="$root.isShowNewPeoplePop"></new-people-pop>
<renewal-coupon-pop v-if="$root.isShowRenewalCoupon"></renewal-coupon-pop>
<speedup-activity-pop v-if="$root.isShowBroadbandUpPop"></speedup-activity-pop>
<cate2-pop v-if="$root.isShowCate2Common"></cate2-pop>
<!-- 边走边测视频收集活动弹窗 -->
<video-collection v-if="$root.showVideoCollection"></video-collection>
<div class="right-bottom-pop" style="display: none;">
<img src="/images/closebtn.svg" alt="" class='close-right-bottom-pop'>
<a href="javascript:void(0)" target="_blank">
<img src="" id="pop-img" style="display: none;">
</a>
</div>
</main>
<script src="/js/manifest.js?id=e2b173cd8c4fbfd0e036"></script>
<script src="/js/vendor.js?id=44632c918766e2bb354a"></script>
<script src="/js/app.js?id=28432a67f5e37142be93"></script>
<script>
$(function () {
let date = '2024-05-20';
$(".close-right-bottom-pop").click(function () {
$(".right-bottom-pop").css({
"bottom": "-370px"
});
sessionStorage.setItem('right-bottom-pop', date);
return false;
});
});
</script>
<script>
function speedHeight() {
/*中间高度适应不同高度浏览器*/
var h = window.innerHeight;//获取屏幕高度
var speedHeight = document.getElementsByClassName("contentMinHeight")[0];
if (document.getElementsByClassName("footer-container")[0]) {
var footerHeight = document.getElementsByClassName("footer-container")[0].clientHeight;
speedHeight.style.minHeight = h - footerHeight - 80 + "px";
}
}
(function () {
speedHeight();
window.onresize = function () {
speedHeight();
};
})();
</script>
<script type="text/javascript">
(window.slotbydup = window.slotbydup || []).push({
id: "u6010626",
container: "_lvx7bi6dooi",
async: true
});
</script>
<script type="text/javascript">
(window.slotbydup = window.slotbydup || []).push({
id: "u6038006",
container: "_3cjh0hos215",
async: true
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.1/js/swiper.min.js"></script>
<script>
var videoClickX = 0;
function getAbsLeft(obj) {
var left = obj.offsetLeft;
while (obj = obj.offsetParent) {
left += obj.offsetLeft;
}
return left;
}
function playVideo(url, id) {
app.$root.videoSrc = url;
app.$root.playing = true;
setTimeout(function () {
var itemWidth = document.getElementsByClassName('vimg')[0].clientWidth;
var left = getAbsLeft(document.getElementsByClassName('video-5g-swiper-container-wrap')[0]);
var gap = (document.getElementsByClassName('video-5g-swiper-container-wrap')[0].clientWidth - itemWidth * 3) / 2;
let videoIndex;
if (videoClickX - left <= itemWidth) {
videoIndex = 1;
} else if (videoClickX - left <= itemWidth * 2 + gap) {
videoIndex = 2;
} else {
videoIndex = 3;
}
api.buriedPointV3({
source: 'www',
sourceId: id,
position: 'index-video-click-' + videoIndex
})
}, 300)
}
//手机浏览器强制跳转到手机版首页
function isPC() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "mobile", "iPad", "iPod"];
var flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
var mySwiperV = new Swiper('.swiper-container-v', {
loop: true, // 循环模式选项
slidesPerView: 3, // 一次显示3张图片
slidesPerGroup: 3,
spaceBetween: 15,
edgeSwipeThreshold: 50,
autoplay: {
delay: 3000,
disableOnInteraction: false
}, //自动播放
// 如果需要分页器
pagination: {
el: '.swiper-pagination',
clickable: true,
},
// 如果需要前进后退按钮
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
on: {
click: function (e) {
videoClickX = e.x;
}
}
})
function changeWindow() {
var h = document.documentElement.clientHeight;
var speedHeight = document.getElementsByClassName("speed-index")[0];
// speedHeight.style.height = h - 80 + "px";
if (h < 900) {
document.getElementsByClassName("index-speedtest-content-box")[0].style.transform = "scale(0.8)";
document.getElementsByClassName("index-speedtest-content-box")[1].style.transform = "scale(0.8)";
if (document.getElementsByClassName("index-speedtest")[0]) {
document.getElementsByClassName("index-speedtest")[0].style.transform = "scale(0.9)";
}
} else {
document.getElementsByClassName("index-speedtest-content-box")[0].style.transform = "scale(1)";
document.getElementsByClassName("index-speedtest-content-box")[1].style.transform = "scale(1)";
if (document.getElementsByClassName("index-speedtest")[0]) {
document.getElementsByClassName("index-speedtest")[0].style.transform = "scale(1)";
}
}
}
$(function () {
// app.$root.indexInfo = JSON.parse(sessionStorage.getItem("indexInfo"));
changeWindow();
if (!isPC()) {
location.href = 'http://m.speedtest.cn/'
}
});
window.onresize = function () {
changeWindow()
};
//swiper轮播
var mySwiper = new Swiper('.swiper-container', {
autoplay: {
delay: 3000,
disableOnInteraction: false
}, //自动播放
loop: true, // 循环模式选项
directionNav: true,
// 如果需要分页器
pagination: {
el: '.swiper-pagination',
},
// //前进后退
// navigation: {
// nextEl: '.swiper-button-next',
// prevEl: '.swiper-button-prev',
// },
});
if (mySwiper.el) {
//鼠标放上暂停轮播
mySwiper.el.onmouseover = function () {
mySwiper.autoplay.stop();
// mySwiper.navigation.$nextEl.css('display',"flex");
// mySwiper.navigation.$prevEl.css('display',"flex");
};
mySwiper.el.onmouseleave = function () {
mySwiper.autoplay.start();
// mySwiper.navigation.$nextEl.css('display',"none");
// mySwiper.navigation.$prevEl.css('display',"none");
}
}
function goToLink(url) {
let link = url + '/ranks'
window.open(link)
}
</script>
<!-- End Google Tag Manager -->
<script type="text/javascript" src="//cpro.baidustatic.com/cpro/ui/cm.js" async="async" defer="defer"></script>
<script async>
window.onload = function() {
setTimeout(function() {
let script = document.createElement("script");
script.setAttribute("async", "");
script.src = "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
document.body.appendChild(script);
}, 2e3);
}
</script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-3179016792556792",
enable_page_level_ads: true
});
</script>
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?8decfd249e4c816635a72c825e27da1a";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
return !!(ua.match(/MicroMessenger/i) == "micromessenger" || ua.match(/QQ\/[0-9]/i));
}
function isMobile() {
var mobile_flag = false;
var userAgentInfo = navigator.userAgent;
var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
//根据userAgent判断是否是手机
for (var v = 0; v < mobileAgents.length; v++) {
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
mobile_flag = true;
break;
}
}
var screen_width = window.screen.width;
var screen_height = window.screen.height;
//根据屏幕分辨率判断是否是手机
if (screen_width < 500 && screen_height < 800) {
mobile_flag = true;
}
return mobile_flag;
}
</script>
</body>
</html>