Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我遇到了一个我不太熟悉的符号,并且想知道在哪里看的方向。
符号是"selector event" : function() {}
"selector event" : function() {}
所以例如
".elementClass change" : function() {}
此表示法适用key-value于object. 具体示例是属于选择器和事件键的函数值。然后可以使用以下键访问该功能:
key-value
object
var obj = { ".elementClass change": function () {} }; var func = obj[".elementClass change"];