pc端网站如何自动跳转到移动wap端网站
<script type="text/javascript"> var uaTest = /Android|webOS|Windows Phone|iPhone|ucweb|ucbrowser|iPod|BlackBerry/i.test(navigator.userAgent.toLowerCase()); var touchTest = 'ontouchend' in document; if (uaTest && touchTest) { window.location.href = '手机端网址; } function AddFavorite(sURL, sTitle) { try { window.external.addFavorite(sURL, sTitle); } catch (e) { try { window.sidebar.addPanel(sTitle, sURL, ""); } catch (e) { alert("加入收藏失败,请使用Ctrl+D进行添加"); } } } </script>