私のコード:
document.write('<ul>');
document.write('<li><font color="green">intellectual:</font></li>' + bioEnergy);
document.write('<li><font color="red">emotional:</font></li>' + bioEmot);
document.write('<li><font color="blue">physical: </font></li>' + bioPhy);
document.write('</ul>');
出力:
intellectual:
0.8
emotional:
0.0
physical:
0.0
私が必要とするのは、次のようにフォーマットすることです:intellectual: 0.8
など。これを機能させるために HTML のスタイルを設定する方法がわかりません。