I've a string like this
var str = "<div class=\"@@obj.classname@@\" style="\@@obj.color@@\">@@obj.content@@</div>";
I'd like to create a function to dynamically change it and get this result
var result = "<div class=\"" + opt.obj.classname + "\" style="\" opt.obj.color + "\">" + opt.obj.content + "</div>";
Is it possibile to do it? How could I do that? the replace function might help? Thank you