请问,JS的匿名函数有几种?

来源:百度知道 编辑:UC知道 时间:2024/06/10 07:49:30
var $=function(node)
{
return document.getElementById(node);
}

limrq.onmouseout=function(){
mrqInterval[1]=window.setInterval("nxtmrq()",2000);

除了这两种,还有哪几种?

还有;
(function(x) { alert(x-13); })
(55);

用法:
<body>
<div id=ss></div>

<script>

function Button(dwcli) {
this.dwcli = dwcli;
this.button = document.createElement("button");
this.button.appendChild(document.createTextNode("test"));
this.button.onclick =(function(v) { return function() { alert(v); };}) (this.dwcli);
}

document.getElementById("ss").appendChild(new Button("dwcli").button);
</script>
</body>