Answer the question
In order to leave comments, you need to log in
How to properly embed a construct in a string?
Forgive me in advance. I don’t know what the question specifically refers to, so I set the tags. There is a script that when you click on the button displays a line in which there is a variable. let's say the line looks like this
var a=1;
$('<h1>'+a+'</h1>');
<%=Language.Get("Footer_products_title") %>
$('<h1>'+<%=Language.Get("Footer_products_title") %>+'</h1>');
Answer the question
In order to leave comments, you need to log in
Does it come from the server? If yes, then like this
should work.
If this is from a template engine in JS, then like this
$('<h1>' + Language.Get("Footer_products_title") + '</h1>');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question