var s = "type_obj.onclick = new Function(\"action_sel("+mode_obj+",'laps_type'))"
eval(s);

解决方案 »

  1.   

    try
    type_obj.onclick = function (){
       action_sel(mode_obj,'laps_type');
    }
      

  2.   

    Re:btut2004 你写得太快,有点笔误
    var s = "type_obj.onclick = new Function(\"action_sel("+mode_obj+",'laps_type')\")"  
    eval(s); //这样也不行,错误'object'未定义ice_berg16 的代码可以。微软文档上有这样的语法定义object.onclick = handler;不能有参数。
    为了给type_obj.onclick 绑上一个带参数的函数,就得再包一层函数,觉得很不爽 。
      

  3.   

    谁知到给type_obj.onclick 绑上一个带参数的函数
      

  4.   

    http://community.csdn.net/Expert/topic/3271/3271263.xml?temp=.1554224