Automatically determine whether a mobile or PC-side jump is done through code

Source: Internet
Author: User

1 <!--2017/09/13 Jump Mobile page start by imp pser -2 <Metaname= "Mobile-agent"content= "Format=html5;url=http://forbag.inrn.net/kh1m.aspx">3 <Scripttype= "Text/javascript">4     varUseragentinfo=navigator.useragent;5     if(Useragentinfo.indexof ("Android") > 0 ||Useragentinfo.indexof ("IPhone") > 0 ||Useragentinfo.indexof ("SymbianOS") > 0 ||Useragentinfo.indexof ("Windows Phone") > 0 ||Useragentinfo.indexof ("IPod") > 0 ||Useragentinfo.indexof ("IPad") > 0) 6     {7 window.location.href= "http://forbag.inrn.net/kh1m.aspx";8     }Else {9         }Ten </Script> One <!--2017/09/13 Jump Mobile page End by IMP pser -

Insert the above code between the areas of the home page source file, and when the user enters the URL http://forbag.inrn.net on the phone, it jumps directly to the http://forbag.inrn.net/kh1m.aspx page content.

Automatically determine whether a mobile or PC-side jump is done through code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.