HTML Language Injection in JavascriptCode with Variables

Hi.
Is it possible to use javascript variables in HTML Code?
Like
<section>
   <h2>"+ myVariable +"<h2>
</section>

1 comment
Comment actions Permalink

"+ 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

0

Please sign in to leave a comment.