JS判断终端

//判断手机终端
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
  window.location.href = 'mobile.html'
}

  

原文地址:https://www.cnblogs.com/xiaomingSun/p/7047252.html