利用纯js实现判断变色功能改进版

版权声明: https://blog.csdn.net/eds124/article/details/85217810
o=document.getElementsByTagName('table');
for(i=0; i<o[0].rows.length; i++){
	td=o[0].rows[i].cells[3];
	if(td.textContent < '2018-12-20 19:05:08'){
		td.style.backgroundColor="red";
	}else{
		td.style.backgroundColor="green";
	}
}
"green"

猜你喜欢

转载自blog.csdn.net/eds124/article/details/85217810
今日推荐