js字符串转化为方法调用

 function alertFunc(str1,str2,str3){
       alert(str1);
       alert(str2);
       alert(str3);
   }
 
 function callAlert(functionName){
       var  func=eval(functionName);

      new func(arguments[1],arguments[2],arguments[3]);

  }
 

  

posted @ 2016-08-07 07:44  calochCN  阅读(496)  评论(0编辑  收藏  举报