在需要被pc端访问的页面的脚本里加上如下代码即可:

<script>
var system = {}; var p = navigator.platform; var u = navigator.userAgent; system.win = p.indexOf("Win") == 0; system.mac = p.indexOf("Mac") == 0; system.x11 = (p == "X11") || (p.indexOf("Linux") == 0); if (system.win || system.mac || system.xll) {//如果是PC转   if (u.indexOf('Windows Phone') > -1) { //win手机端   } else {     window.location.href = "提示页面路径";   } }
</script>

 

相关文章:

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