我想改变text color
元素。我搜索了它,但没有得到正确的解决方案。当我使用它时,只需更改 td 的3 个边框颜色,但顶部边框仍然没有更改,我不知道为什么会这样。border color
<TD>
border-color:blue
td
而且我想改变text color
使用td
java脚本,但没有这样的属性。请建议我该怎么做?
我正在尝试创建日历控件这是我的代码...
<script id="allTemplate" type="text/raj">
<tr>
{{if "Su" == Sunday }}
<td>${Sunday}</td>
{{else}}
{{if date.getDate() == Sunday }}
<td id="cell${Sunday}" style="border:1px solid blue;cursor: pointer" onclick="selectDate('${Sunday}','cell${Sunday}')">${Sunday}</td>
{{else}}
{{if "" == Sunday }}
<td>${Sunday}</td>
{{else}}
<td id="cell${Sunday}" style="cursor: pointer" onclick="selectDate('${Sunday}','cell${Sunday}')">${Sunday}</td>
{{/if}}
{{/if}}
{{/if}}
{{if "Mo" == Monday }}
<td>${Monday}</td>
{{else}}
{{if date.getDate() == Monday }}
<td id="cell${Monday}" style="border:1px solid blue; cursor: pointer" onclick="selectDate('${Monday}','cell${Monday}')"><font color="Red">${Monday}</font></td>
{{else}}
{{if "" == Monday }}
<td>${Monday}</td>
{{else}}
<td id="cell${Monday}" style="cursor: pointer" onclick="selectDate('${Monday}','cell${Monday}')">${Monday}</td>
{{/if}}
{{/if}}
{{/if}}
{{if "Tu" == Tuesday }}
<td>${Tuesday}</td>
{{else}}
{{if date.getDate() == Tuesday }}
<td id="cell${Tuesday}" style="border:1px solid blue; cursor: pointer" onclick="selectDate('${Tuesday}','cell${Tuesday}')"><font color="Red">${Tuesday}</font></td>
{{else}}
{{if "" == Tuesday }}
<td>${Tuesday}</td>
{{else}}
<td id="cell${Tuesday}" style="cursor: pointer" onclick="selectDate('${Tuesday}','cell${Tuesday}')">${Tuesday}</td>
{{/if}}
{{/if}}
{{/if}}
{{if "We" == Wednesday }}
<td>${Wednesday}</td>
{{else}}
{{if date.getDate() == Wednesday }}
<td id="cell${Wednesday}" style="border:1px solid blue; cursor: pointer" onclick="selectDate('${Wednesday}','cell${Wednesday}')"><font color="Red">${Wednesday}</font></td>
{{else}}
{{if "" == Wednesday }}
<td>${Wednesday}</td>
{{else}}
<td id="cell${Wednesday}" style="cursor: pointer" onclick="selectDate('${Wednesday}','cell${Wednesday}')">${Wednesday}</td>
{{/if}}
{{/if}}
{{/if}}
{{if "Th" == Thursday }}
<td>${Thursday}</td>
{{else}}
{{if date.getDate() == Thursday }}
<td id="cell${Thursday}" style="border:1px solid blue; cursor: pointer" onclick="selectDate('${Thursday}','cell${Thursday}')"><font color="Red">${Thursday}</font></td>
{{else}}
{{if "" == Thursday }}
<td>${Thursday}</td>
{{else}}
<td id="cell${Thursday}" style="cursor: pointer" onclick="selectDate('${Thursday}','cell${Thursday}')">${Thursday}</td>
{{/if}}
{{/if}}
{{/if}}
{{if "Fr" == Friday }}
<td>${Friday}</td>
{{else}}
{{if date.getDate() == Friday }}
<td id="cell${Friday}" style="border:1px solid blue; cursor: pointer" onclick="selectDate('${Friday}','cell${Friday}')"><font color="Red">${Friday}</font></td>
{{else}}
{{if "" == Friday }}
<td>${Friday}</td>
{{else}}
<td id="cell${Friday}" style="cursor: pointer" onclick="selectDate('${Friday}','cell${Friday}')">${Friday}</td>
{{/if}}
{{/if}}
{{/if}}
{{if "Sa" == Saturday }}
<td>${Saturday}</td>
{{else}}
{{if date.getDate() == Saturday }}
<td id="cell${Saturday}" style="border:1px solid blue; cursor: pointer" onclick="selectDate('${Saturday}','cell${Saturday}')"><font color="Red">${Saturday}</font></td>
{{else}}
{{if "" == Saturday }}
<td>${Saturday}</td>
{{else}}
<td id="cell${Saturday}" style="cursor: pointer" onclick="selectDate('${Saturday}','cell${Saturday}')">${Saturday}</td>
{{/if}}
{{/if}}
{{/if}}
</tr>
</script>
这是我想更改 td 的边框颜色的 j 查询模板,当条件为真时,它会更改 td 的边框颜色,但只有 3 个边缘而不是顶部一个。