HTML Language Injection in JavascriptCode with Variables Follow Ugur Aslan Created July 30, 2015 10:09 Hi.Is it possible to use javascript variables in HTML Code? Like<section> <h2>"+ myVariable +"<h2></section>
"+ myVariable +" in your code snippet is just a plain text - none of the browsers will recognize it as javascript variable.
see http://stackoverflow.com/questions/14845710/javascript-variable-access-in-html for some hints