How do I detect if the browser supports HTML5 data attribute开发者_开发知识库 using Modernizr?
Test whether an element has the property dataset.
Modernizr.addTest('data', function () {
    var elem = document.createElement('div');
    return !!elem.dataset;
});
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论