nextSlbling属性 获取某个节点后面的第一个节点(可能是标签 文本)

  判断获取的节点是否为标签节点还是文本节点

window.onload=function(){
var pagecount={$page_count};
document.getElementById('firsts').setAttribute('class','disabled');
document.getElementById('before').setAttribute('class','disabled');
var current=document.getElementById('before').nextSibling;
while(current.nodeType != 1){      根据nodeType判断节点属性
current=current.nextSibling;
}
current.setAttribute('class','current');
if(pagecount==1){
document.getElementById('next').setAttribute('class','disabled');
document.getElementById('last').setAttribute('class','disabled');
}
}

最新文章

  1. svn 版本转为git
  2. hibernate的映射类型
  3. 关于IIS部署时出现“System.Data.OracleClient 需要 Oracle 客户端软件 8.1.7 或更高版本”的问题解决摘要
  4. 使用tcp_probe时最初没有输出,先卸载后加载模块之后就有了。
  5. Canvas之打字机游戏
  6. 【java】之读取InputStream流
  7. 用c#开发微信 (13) 微统计 - 阅读分享统计系统 3 UI设计及后台处理
  8. URAL 1205 By the Underground or by Foot?(SPFA)
  9. Searching in a rotated and sorted array
  10. JavaScript高级程序设计39.pdf
  11. [已解决问题] An error occurred while automatically activating bundle com.android.ide.eclipse.adt
  12. 升级 mysql5.6 配置文件my.cnf sql_mode 解析与设置问题
  13. flex-骰子布局
  14. java请求URL带参之防XSS攻击
  15. MQ & RPC 消息队列与RPC的区别与使用场景
  16. HDU3507-Print Article-斜率dp入门题
  17. 不能靠眼睛之 KEIL 中失效代码灰暗特性
  18. WEB服务器----Apache 安装配置
  19. Ubuntu 14.04环境变量修改
  20. 【Python】Python文件系统功能:os模块

热门文章

  1. 用Seam实现:图片上传 + 保存到数据库 + 从数据库读出图片并显示到页面中
  2. Ruby学习笔记(二)
  3. [RxJS] Filtering operators: skipWhile and skipUntil
  4. QDomDocument类
  5. QT QXmlStreamWriter用法小结
  6. iOS-系统定位功能
  7. [iOS 开发] app无法访问本地相册,且不显示在设置 -隐私 - 照片中
  8. 如何在单元测试中测试异步函数,block回调这种
  9. RHEL7重置root密码
  10. sqlserver 2008表分区操作