Do not want to through the CSS self-adaptation in the PC side and mobile display of different styles, then only through the mobile access to the PC-side web page to jump to the corresponding mobile page, then how to jump, there are many articles on the Internet, the following is my test effective way.
1.
PC-Side Access display:
Mobile-side Access display:
2. Achieve:
Do not consider the mobile search engine optimization, only need to determine whether the mobile side by JS, and then determine whether to jump to the specified page on the line, the main JS as follows:
//determines whether the mobile side, if yes, jumps to the specified URL addressfunctionbrowserredirect (URL) {//A read-only String that declares the value of the user agent header used by the browser for HTTP requests varSuseragent =navigator.userAgent.toLowerCase (); varBisiphoneos = Suseragent.match (/iphone os/i) = = "iphone OS"; varBISMIDP = Suseragent.match (/midp/i) = = "MIDP"; varBIsUc7 = Suseragent.match (/rv:1.2.3.4/i) = = "rv:1.2.3.4"; varBISUC = Suseragent.match (/ucweb/i) = = "UCWeb"; varBisandroid = Suseragent.match (/android/i) = = "Android"; varBisce = Suseragent.match (/windows ce/i) = = "Windows CE"; varBISWM = Suseragent.match (/windows mobile/i) = = "Windows Mobile"; if(Bisiphoneos | | bismidp | | bIsUc7 | | bisuc | | bisandroid | | bisce | |biswm) {window.location.replace (URL); }}
Then in the page reference JS, call the method on the line:
<Scriptsrc=".. /js/wap.js "></Script> <Scripttype= "Text/javascript">Browserredirect ("http://ycdoit.com/test/testmobile.html");</Script>
PS: You can use the PC-side and mobile-side access to test pages to see the effect.
Jump to the corresponding mobile page when accessing the PC-side web page on the mobile side