JavaScriptDouglas Crockford: ”The JavaScript Program - Yahoo! Video String.prototype.supplant = function (o) { return this.replace(/{([^{}]*)}/g, function (a, b) { var r = o[b]; return typeof r === 'string' ? r : a; } ); }; var template = '' + 'Last{last}' + 'First{first}' + ''; var data = { first: "Carl", last: "Hollywood", border: 2 }; mydiv.innerHTML = template.supplant(data);