JavaScript 㧠DOM ããããããããã®ã¯å¤§å¤ã ãã©ãã§ãããã³ãã¬ã¼ãã¨ã³ã¸ã³ã使ãã®ã¯ã¡ãã£ã¨å¤§ããã ãã¨ããã¨ããããããããªã¨ãã«æ°è»½ã«ä½¿ãããã³ãã¬ã¼ãã¨ã³ã¸ã³ãä½ã£ã¦ã¿ãã ã½ã¼ã¹ã¯ä»¥ä¸ã®éãã function applyTemplate(template, f) { try { return template.replace(/#\{[^#{}]+}/g, function(s) { var v = f(s.slice(2, -1)); return v == null ? '' : v.toString().escapeHTML(); }); } catch (e) { return '[' + e.name + '] ' + e.message; } } 使ãæ¹ã¯ã <div id="template" style="display:none"> <h2>#
{{#tags}}- {{label}}
{{/tags}}