当前位置:网站首页>H5 close the current page, including wechat browser (with source code)
H5 close the current page, including wechat browser (with source code)
2022-06-26 15:52:00 【Heart piercing mania】
In wechat browser window.close() Can't close the web page , So use it alone WeixinJSBridge.call('closeWindow');
We can judge whether the current browser is wechat browser
var ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
console.log(' Wechat browser ');
} else {
console.log(' Not wechat browser ');
}Wechat browser
WeixinJSBridge.call('closeWindow');Other browsers
window.close()It's a perfect solution !!!!!
边栏推荐
- NFT交易原理分析(1)
- 评价——TOPSIS
- Super double efficiency! Pycharm ten tips
- 还存在过有键盘的kindle?
- 9 Tensorboard的使用
- NFT 项目的开发、部署、上线的流程(2)
- Everyone is a scientist free gas experience Mint love crash
- 【leetcode】331. Verifying the preorder serialization of a binary tree
- HW安全响应
- Is it safe to open an account for mobile stock registration? Is there any risk?
猜你喜欢

9 use of tensorboard

9 Tensorboard的使用
![[problem solving] the loading / downloading time of the new version of webots texture and other resource files is too long](/img/31/d14316dca740590c1871efe6587e04.png)
[problem solving] the loading / downloading time of the new version of webots texture and other resource files is too long

NFT交易原理分析(2)

Utilisation d'abortcontroller

HW安全响应
![[graduation season · advanced technology Er] what is a wechat applet, which will help you open the door of the applet](/img/c8/f3f31a8e53c5918abc719603811cc7.png)
[graduation season · advanced technology Er] what is a wechat applet, which will help you open the door of the applet

效率超级加倍!pycharm十个小技巧就是这么神

Development, deployment and online process of NFT project (1)

Svg canvas canvas drag
随机推荐
NFT 平台安全指南(2)
svg canvas画布拖拽
Application of ansible automation
Analyse panoramique de la chaîne industrielle en amont, en aval et en aval de la NFT « Dry goods»
Don't remove custom line breaks on reformat
Transaction input data of Ethereum
NFT Platform Security Guide (1)
Reflection modification final
「干货」NFT 上中下游产业链全景分析
selenium将元素保存为图片
PCIe Capabilities List
手机上怎么开户?在线开户安全么?
el-dialog拖拽,边界问题完全修正,网上版本的bug修复
【leetcode】48.旋转图像
JVM notes
2Gcsv文件打不开怎么处理,使用byzer工具
【微信小程序】事件绑定,你搞懂了吗?
音视频学习(三)——sip协议
Secure JSON protocol
Solana capacity expansion mechanism analysis (2): an extreme attempt to sacrifice availability for efficiency | catchervc research