In javascript
, how do I get the value of a string
and use a function as a call, I save in the database which function to use in onchange
of an input, exe: validaData
validaCPF
, diaUtil
.
Example:
var func = "processaDados";
func("teste",2);
function processaDados(x,y){
alert(x);
}
I already saw this in php
if I'm not mistaken.