有人能帮我理解这个语法是什么意思吗?围绕函数的括号
为什么有一个(在function()的前面,并且有一个)();功能结束后?
(function()
{
CKEDITOR.htmlParser.cdata = function(value)
{
this.value = value;
};
CKEDITOR.htmlParser.cdata.prototype =
{
type : CKEDITOR.NODE_TEXT,
writeHtml : function(writer)
{
writer.write(this.value);
}
};
})();
请问有人请帮我理解这个语法是什么意思?为什么在function()前面有$使用了?
$ : function(rules)
{
this._ =
{
elementNames : [],
attributeNames : [],
elements : { $length : 0 },
attributes : { $length : 0 }
};
if (rules)
this.addRules(rules, 10);
},
非常感谢!
有人请帮我理解这个语法是什么意思?为什么在function()前面有$使用了? $:函数(规则) – dojomedojo