I want to create a text template and set in it placeholders and fill this placeholders and use it in my page? like ..
var temp = '<div class="persons">';
temp += '<p> <span class="firstname">First Name :</span> <span> [firstname]</span> </p>';
temp += '<p> <span class="lastname">Last Name :</span> <span> [lastname]</span> </p>';
temp += '<p> <span class="tel">Telephone :</span> <span> [tel]</span> </p>';
temp += '</div>';
and change [firstname]
, [lastname]
, [tel]
with my values and show in page?
or any other idea?