How do I execute some JavaScript that is a string?
function ExecuteJavascriptString() { var s = \"alert(\'hello\')\"; // how do I get a browser to al
Use eval as below. Eval should be used with caution, a simple search about "eval is evil" should throw some pointers.
function ExecuteJavascriptString() { var s = "alert('hello')"; eval(s); }