检测HTML5历史是否支持或不 [英] Detect whether HTML5 History supported or not
本文介绍了检测HTML5历史是否支持或不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何我可以检查如果您正在使用支持的浏览器HTML5 API历史?
正如你可以在这里看到 http://caniuse.com/#search=history 只有镀铬+ FF4和其他几个人支持此,我希望做别的事情,如果他们不能支持这一点。
我怎么可以让一个if语句的somekind的这个检查?
解决方案
如果(的window.history&安培;&安培; window.history.pushState)
另请参阅此全一体几乎字母无废话指南检测一切
How can i check if the browser you are using supports the HTML5 history api?
As you can see here http://caniuse.com/#search=history only chrome +ff4 and several others supports this and i wish to do something else if they cant support this.
How can i make somekind of an if statement for this checking?
解决方案
if (window.history && window.history.pushState)
See also this All-In-One Almost-Alphabetical No-Bullshit Guide to Detecting Everything
这篇关于检测HTML5历史是否支持或不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文