'Replace value in a span tag with percentage
i want the value of e to be a percentage. If value of e is 30 i want to display e as 1.5 that is 5% of 30. Below is the function and html that displays e, thanks for your help.
function g(e) {
p = e;
for (var t = document.getElementsByClassName("aaz"), n = 0; n < t.length; n++)
t[n].textContent = e
}
<span class="aaz">0</span>
I know there's something like this i can use but don't know how to use it "Math.round(e/100*5)"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
