How to determine whether to log in to a mobile phone or a computer in an html webpage

高洛峰
Release: 2017-03-24 11:31:50
Original
2927 people have browsed it

This article explains in detail how to determine whether to log in to a mobile phone or a computer using an HTML web page

<script type="text/javascript">
try{
    if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
        window.location.href="mindex.html";
    }else{
        window.location.href="cindex.html";
    }
}catch(e){}
</script>
Copy after login

The above is the detailed content of How to determine whether to log in to a mobile phone or a computer in an html webpage. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template