Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Fonts 在脚本中动态更改字体颜色_Fonts - Fatal编程技术网

Fonts 在脚本中动态更改字体颜色

Fonts 在脚本中动态更改字体颜色,fonts,Fonts,如何更改结果行中链接文本的字体颜色?未链接的文本从黑色变为白色,但高亮显示行中的链接文本保持黑色。也需要它变成白色 var INTENDED_MONTH = 7 //August // INTENDED_MONTH is zero-relative now = new Date().getDate(), rows = document.getElementById('scripture').rows; if (new Date().getMonth() != INTENDED_MONTH) {

如何更改结果行中链接文本的字体颜色?未链接的文本从黑色变为白色,但高亮显示行中的链接文本保持黑色。也需要它变成白色

var INTENDED_MONTH = 7 //August
// INTENDED_MONTH is zero-relative
now = new Date().getDate(),
rows = document.getElementById('scripture').rows;
if (new Date().getMonth() != INTENDED_MONTH) {
    // need a value here less than 1, or the box for the first of the month will be in Red
    now = 0.5
};
for (var i = 0, rl = rows.length; i < rl; i++) {
    var cells = rows[i].childNodes;
    for (j = 0, cl = cells.length; j < cl; j++) {
        if (cells[j].nodeName == 'TD'
  && cells[j].firstChild.nodeValue != ''
  && cells[j].firstChild.nodeValue == now) {
            rows[i].style.backgroundColor = 'red' // 'ffff99' // '#ffd700' // TODAY - red
            rows[i].style.color = 'white'
      $('html,body').delay(500).animate({scrollTop:rows[i].offsetTop}, 2000);
        }
    }
}​
var\u月=7//8月
//预期月为零相对月
现在=新日期().getDate(),
rows=document.getElementById('classic').rows;
如果(新日期().getMonth()!=预定月份){
//此处需要小于1的值,否则本月第一个月的框将显示为红色
现在=0.5
};
for(var i=0,rl=rows.length;i
您可以在javascript/jquery中执行此操作。使用行[i].style.color='white'将文本变为白色。我将如何更改此设置以使链接文本变为白色?如果“style.color”更改常规文本颜色,那么在此特定代码中,当存在基础超链接时,将如何更改文本颜色?谢谢。你可以更改超链接的颜色,它应该可以工作。您需要使用javascript/jquery设置css。更改文本颜色的命令是style.color。更改单元格背景颜色的命令为style.background.color。我需要知道的是更改具有链接的文本颜色的命令。还有谁能帮我吗?谢谢