0

Can you state a variable value in an HTML paragraph?

I was wondering if it is possible to show a variable value in an HTML paragraph. Ex: <p> “Money: “ (Variable value goes here) <p> Everywhere I look online has wrong or confusing answers, I was hoping you guys could help

24th Jul 2020, 4:07 AM
Owen Clapp
Owen Clapp - avatar
1 ответ
0
In HTML section <p>Money: <span id="money"></span></p> In JS section onload = () => { document.getElementById("money").innerText = 250000; }
24th Jul 2020, 4:23 AM
Ipang