Questions tagged «object-notation»

10
JSON和对象文字表示法有什么区别?
有人可以告诉我使用对象文字表示法定义的JavaScript对象与JSON对象之间的主要区别是什么吗? 根据一本JavaScript书,它说这是使用Object Notation定义的对象: var anObject = { property1 : true, showMessage : function (msg) { alert(msg) } }; 为什么在这种情况下不是JSON对象?只是因为它不是通过使用引号定义的?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.