Call javascript function from string name

Posted on
var strFunc = "myFunc";
var strParam = "functionParameter"

//Create the function
var func = window[strFunc];

//Call the function
func(strParam);

Leave a Reply

Your email address will not be published.