K
K
keks0002018-03-05 00:38:38
css
keks000, 2018-03-05 00:38:38

How to add css class to js?

I don't understand how to add css class .coin_icon
to var CURRENCY = " ";

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aloky, 2018-03-05
@aloky

var newDiv = document.createElement("div");
newDiv.className = "coin_icon";
newDiv.textContent = "Привет!";

X
xmoonlight, 2018-03-05
@xmoonlight

How to learn JS? Learning plan and resources. , p.2: "top-10-functions" (p.7):

addClass() / removeClass()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question