3 ms·
HTML is easy and fun ... <h1 class="big"><% =topic %></h1> vs function createTopic(strTopic) { var heading = document.createElement("h1"); var to
by z3t4 10y ago
HTML is easy and fun ...
<h1 class="big"><% =topic %></h1>
vs
function createTopic(strTopic) {
var heading = document.createElement("h1");
var topicText = document.createTextNode(strTopic);
heading.appendchild(topicText);
heading.setAttribute("class", "big");
return heading;
}