<span style="color:#32cd32" id="latestState">正常</span>
$("#latestState").text(latestState).attr("style","color:"+latestStateColor+";");
<span style="color:#32cd32" id="latestState">正常</span>
$("#latestState").text(latestState).attr("style","color:"+latestStateColor+";");