//输入要隔行变色的标签名

function setbgColor(tr){
  var tr = document.getElementsByTagName("tr");
  for(var i = 1; i < tr.length ; i += 2){ // 从第二行开始遍历,i初始为1,递增2
  tr[i].style.backgroundColor = "red";
  }
}

最新文章

  1. UI-切圆角、透明度、取消按钮点击高亮效果、按钮文字带下划线
  2. javascript 基础
  3. ubuntu12.04安装WineQQ2012
  4. DBlink与同义词
  5. 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!
  6. 判断IE和Edge
  7. ckeditor+jsp+spring配置图片上传
  8. How to add “Maven Managed Dependencies” library in build path eclipse
  9. shuffle() 函数(转)
  10. POJ 1637 混合图欧拉回路
  11. 基于hash的文档判重——simhash
  12. oracle中nvl函数
  13. Linux 环境变量详解
  14. Iframe刷新页面
  15. Java一点输入输出技巧
  16. Moq 在.net Core 单元测试中的使用
  17. HTML- 标签语法
  18. java基础5 (一维)数组和二维数组
  19. struts 1.x 方法探析
  20. ActiveMQ与RabbitMQ的区别

热门文章

  1. 四大MQ比较及MQ详解
  2. 使用Word2016直接发布博客
  3. [置顶] 大数据架构hadoop
  4. 利用redis实现elasticsearch入库去重
  5. 洛谷—— P1204 [USACO1.2]挤牛奶Milking Cows
  6. json_encode把中文字符的数组转为json格式
  7. java多线程具体总结
  8. leetCode(32):Power of Two
  9. BAT常问问题总结以及回答(问题汇总篇)
  10. linux删除多行