Detecting support of local storage 发表于 2011-12-29 | | 阅读次数 1234567891011121314function LocalStorage(){}extend(LocalStorage.prototype, { isSupportCookie : function(){ return navigator.cookieEnabled; }, isSupportUserData : function(){ var t = document.createElement('input'); return (typeof t.addBehavior !== 'undefined'); }, isSupportDOMStorage : function(){ return (typeof window.localStorage !== 'undefined'); }}); 本文作者: IIssNan 本文链接: http://notes.iissnan.com/2011/detecting-support-of-local-storage/ 版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!