javascript - Find out if HTC phone enters a mobile app -


i know code redirect blackberries;

if ((/blackberry/i.test(navigator.useragent))) {         //send mobile page (blackberries)         window.location = ("../default.aspx");  }  

but use replace blackberry htc phones?

i looked here there seems different ones every phone. there single call use?

edit c# way detect work too. along lines of this:

if (request.headers["user-agent"] != null && (request.browser["ismobiledevice"] == "true"){                 if(request.browser ["blackberry"] == "true")                 {                     if(int.parse(request.browser.version) < 4.5)                     {                        //this how blackberry version right?                     }                  }                 else if(request.useragent.toupper().contains("htc"))                 {                  }             } 

to find if phone htc server side this:

if(request.useragent.toupper().contains("htc")){    //code } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -