HTML 5是否支持所有主要浏览器? [英] Is HTML 5 supported by all the main browsers?
问题描述
我正在查看html 5的自定义属性功能,此处链接
http://ejohn.org/blog/html-5-data-attributes/
这看起来像是我使用时的完美之作jQuery的/ JavaScript的。
我的问题,HTML 5是否支持所有主要浏览器?
示例
< li class =userdata-name =John Resigdata-city =Boston
data-lang = jsdata-food =Bacon>
< b>约翰说:< / b> < span>你好,你好吗?< / span>
< / li>
不同浏览器支持HTML5的各个部分,为'supported'的各种定义。
几个部分可靠地工作 。您在问题中询问的data- *属性在每个浏览器中都能正常工作,甚至是IE6;然而,没有人支持有趣的数据集方法来访问它们。只要你用完整的attr名字抓住他们就可以了,你就是金。我使用它们在我的webapps中始终存储状态,因为它们是这样做的正式祝福的方法。
维基百科对各种支持级别进行了很好的总结跨浏览器: http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)
I am looking at the custom attributes feature of html 5 here at this link http://ejohn.org/blog/html-5-data-attributes/
This look like the perfect thing for when I am using jquery/javascript.
My question, Is HTML 5 supported by all the main browsers?
example
<li class="user" data-name="John Resig" data-city="Boston"
data-lang="js" data-food="Bacon">
<b>John says:</b> <span>Hello, how are you?</span>
</li>
Various portions of HTML5 are supported by the different browsers, for various definitions of 'supported'.
Several parts work right now, reliably. The data-* attributes you ask about in your question work just fine in every browser, even IE6; however, nobody yet supports the fun "dataset" method to access them. As long as you're fine with just grabbing them by the full attr name, you're golden. I use them to store state all the time in my webapps, as they're the officially blessed method for doing so.
Wikipedia has a good summary of the various support levels across browsers: http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)
这篇关于HTML 5是否支持所有主要浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!