摘要:
[转]JavaScript为事件处理器传递参数方法一:var newopen = function(id,level){ return function() { opentree(id,level);//该函数为外部定义的一个执行函数; }}x.attachEvent("onclick",newopen(id,parseInt(level)+1));y.attachEvent("onclick",newopen(id,parseInt(level)+2));think8848的简化代码:if ( x.addEventListener)//如果浏览器为Fi 阅读全文