call function javascript by string





Calling simple JavaScript function is easy, just call it :) e.g. someFunction() or someOtherFunction(text, 101)Thus is you have a string whose value is the function name. You can call it by eval() function as follow JavaScript, we can call the function according to the function name string, so that we can achieve dynamic function call, you only need to pass the