Ruby's Louvre

每天学习一点点算法

导航

2011年5月16日 #

JSON: The JavaScript subset that isn't

摘要: Written by Magnus Holm. From Wikipedia’s article on JSON JSON was based on a subset of the JavaScript scripting language. All JSON-formatted text is also syntactically legal JavaScript code. JSON is a subset of JavaScript. All these years we’ve heard it over and over again: “JSON is a JavaScript su. 阅读全文

posted @ 2011-05-16 22:37 司徒正美 阅读(1484) 评论(1) 推荐(1) 编辑

判定是否支持DOMFocusIn事件

摘要: var supportDOMFocusIn = false try{ document.addEventListener("DOMFocusIn",function(){ supportDOMFocusIn = true },false); var event = document.createEvent("UIEvent"); event.initEvent("DOMFocusIn", false, true ); document.dispatchEvent(event) }catch(e){} alert( supportDOM 阅读全文

posted @ 2011-05-16 11:37 司徒正美 阅读(1367) 评论(0) 推荐(0) 编辑