I'm total newbie, and i want to know how to put a var x into the span tag so i can change the color of the variable.
function wyr()
{
var x = (Math.floor(Math.random() * 100) + 1);
if(x <= 33)
document.getElementById("x").innerHTML = x + '<span style="color:red;">%</span>';
else if(x >= 34 && x <= 66)
document.getElementById("x").innerHTML = x + '<span style="color:blue;">%</span>';
else
document.getElementById("x").innerHTML = x + '<span style="color:yellow;">%</span>';
}
``