开发者

Code to detect mobile browser support for HTML5

I want the c开发者_运维百科ode (C# / JavaScript) to detect which mobile browsers are support HTML5. I have the code to detect the HTML5(canvas) compatibility for desktop browsers. But this code is not working for mobile browsers.

if (!!document.createElement('canvas').getContext) {
  this browser supports HTML5(canvas)
} else {
    not supports HTML5...
}


You could also use the famous Modernizr.


Use this library http://51degrees.mobi/ it will return you a list of browser capabilities based upon the client and is based from an updated database. We use at work and it's awesome

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜