当前位置:网站首页>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 !!!!!
边栏推荐
- Have you ever had a Kindle with a keyboard?
- High frequency interview 𞓜 Flink Shuangliu join
- 还存在过有键盘的kindle?
- Why are encoder and decoder structures often used in image segmentation tasks?
- [applet practice series] Introduction to the registration life cycle of the applet framework page
- 音视频学习(二)——帧率、码流和分辨率
- 为什么图像分割任务中经常用到编码器和解码器结构?
- TweenMax+SVG切换颜色动画场景
- 2022北京石景山区专精特新中小企业申报流程,补贴10-20万
- Auto Sharding Policy will apply Data Sharding policy as it failed to apply file Sharding Policy
猜你喜欢

Evaluate:huggingface评价指标模块入门详细介绍

Analyse panoramique de la chaîne industrielle en amont, en aval et en aval de la NFT « Dry goods»

PCIe Capabilities List

Keil4 opens the single-chip microcomputer project to a blank, and the problem of 100% program blocking of cpu4 is solved

nanoPi Duo2连接wifi

IDEA本地代理后,无法下载插件

NFT 项目的开发、部署、上线的流程(1)

Particle filter PF - 3D CV target tracking with uniform motion (particle filter vs extended Kalman filter)

查词翻译类应用使用数据接口api总结
![[file] VFS four structs: file, dentry, inode and super_ What is a block? difference? Relationship-- Editing](/img/b6/d288065747425863b9af95ec6fd554.png)
[file] VFS four structs: file, dentry, inode and super_ What is a block? difference? Relationship-- Editing
随机推荐
粒子滤波 PF——在机动目标跟踪中的应用(粒子滤波VS扩展卡尔曼滤波)
svg环绕地球动画js特效
[graduation season · advanced technology Er] what is a wechat applet, which will help you open the door of the applet
JS events
8 user defined evaluation function
【微信小程序】事件绑定,你搞懂了吗?
golang 1.18 go work 使用
全面解析Discord安全问题
2022北京石景山区专精特新中小企业申报流程,补贴10-20万
selenium将元素保存为图片
查词翻译类应用使用数据接口api总结
还存在过有键盘的kindle?
Seurat to h5ad summary
CNN optimized trick
/etc/profile、/etc/bashrc、~/. Bashrc differences
Audio and video learning (III) -- SIP protocol
Evaluate:huggingface评价指标模块入门详细介绍
人人都当科学家之免Gas体验mint爱死机
Solana扩容机制分析(2):牺牲可用性换取高效率的极端尝试 | CatcherVC Research
Selenium chrome disable JS disable pictures