一段js代码电脑跳转手机版
👍 阿里云ECS特惠38元/年 | 腾讯云CVM优惠/38元/年 | 宝塔服务器Web面板 | 七牛云免费10G储存<script type=”text/javascript”>
// JavaScript Document
function urlredirect() {
var sUserAgent = navigator.userAgent.toLowerCase();
if ((sUserAgent.match(/(ipod|iphone os|midp|ucweb|android|windows ce|windows mobile)/i))) {
// PC跳转移动端 Xyok.Net
var thisUrl = window.location.href;
window.location.href = thisUrl.substr(0,thisUrl.lastIndexOf(‘/’)+1)+’wap/’;}
}
urlredirect();
</script>
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END