<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>hello world</title>
<script type="text/javascript" src="js/mui.min.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
mui.plusReady(function() {
document.addEventListener("netchange", wainshow, false);
});
function wainshow() {
if (plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
mui.toast("网络异常,请检查网络设置!");
} else {
mui.toast("网络正常");
}
}
</script>
<div onclick="wainshow();">111111</div>
</body>
</html>
2***@qq.com
- 发布:2016-05-04 23:37
- 更新:2024-06-20 17:48
- 阅读:7675
判断网络是否连接
分类:MUI
2 个评论
要回复文章请先登录或注册
wp_drifter