I have a variable (string) in Javascript, in which you for example have this text:
"document.getElementById('tekst').innerHTML = 'Probeer opnieuw!';"
I got this variable using Ajax and PHP, but that is not where my (possibly very easy) question is about.
Say I want to use this code as code itself, not as a string, so instead of this being a string I would like the code inside of it to be executed.
How can I possibly do this?
Thanks in advance