var newopen = function(id,level)
{
return function()
{
opentree(id,level);//This function is an execution function defined externally;
}
}
x.attachEvent("onclick", newopen(id,parseInt(level) 1));
y.attachEvent("onclick",newopen(id,parseInt(level) 2));
IE only wants to know the compatibility For the code, you can refer to Script House’s previous articles.