Return to Snippet

Revision: 36638
at November 24, 2010 08:27 by serialk89


Initial Code
var agent = navigator.userAgent.toLowerCase();
    var iphone = (agent.indexOf('iphone')!=-1);
    var android = (agent.indexOf('android')!=-1);
    var blackberry = (agent.indexOf('blackberry')!=-1);
    var ipad = (agent.indexOf('ipad')!=-1);
    if (iphone) {
            document.location.href="http://envivo.13.cl/iphone";
    }

    if (android) {
            document.location.href="http://envivo.13.cl/android";
    }

    if (blackberry) {
            document.location.href="http://envivo.13.cl/blackberry";
    }

    if (ipad) {
            //document.location.href="http://envivo.13.cl/ipad";
    }

Initial URL

                                

Initial Description

                                

Initial Title
DETECTAR SI SE ENTRA A LA PLAGINA POR IPHONE, ANDRIOD, JAVASCRIPT

Initial Tags

                                

Initial Language
JavaScript