tanghongbo

关闭当前页面

function closeWP() {
var Browser = navigator.appName;
var indexB = Browser.indexOf(\'Explorer\');

if (indexB > 0) {
var indexV = navigator.userAgent.indexOf(\'MSIE\') + 5;
var Version = navigator.userAgent.substring(indexV, indexV + 1);

if (Version >= 7) {
window.open(\'\', \'_self\', \'\');
window.close();
}
else if (Version == 6) {
window.opener = null;
window.close();
}
else {
window.opener = \'\';
window.close();
}

}
else {
window.close();
}
}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2022-02-11
  • 2021-08-19
  • 2021-08-22
猜你喜欢
  • 2021-12-26
  • 2021-12-22
  • 2021-12-02
  • 2021-12-03
  • 2021-06-21
  • 2022-12-23
相关资源
相似解决方案