Javascript change font color

前端 未结 5 2209
旧时难觅i
旧时难觅i 2020-12-10 19:35

I need to change the font color.

I have the following:

   var clr=\"green\";

    \' + onlineff + \' 
5条回答
  •  -上瘾入骨i
    2020-12-10 19:49

    Try like this:

    var clr = 'green';
    var html = '' + onlineff + ' ';
    

    This being said, you should avoid using the tag. It is now deprecated. Use CSS to change the style (color) of a given element in your markup.

提交回复
热议问题