At present, many websites have appeared mobile version of the website, mobile site and the Internet on the Web site synchronization update, most people visit our website is directly access to the domain name on the computer, it is not possible for the mobile site to remember a domain name, we all know that the Chinese are relatively lazy, then encountered this situation how we face, In fact, the method is very simple is to add a sentence in the site, judge is mobile phone access to the site automatically jump into the mobile version, if it is a computer access to show the normal version of the can. The code is as follows:
1 <script src= "http://siteapp.baidu.com/static/webappservice/uaredirect.js" type= "Text/javascript" ></script>2 <script type= "Text/javascript" >uaredirect ("Your mobile version url");</script>
This is the use of Baidu app, as a jump.