2016年9月17日

检查DOM能力的函数

摘要: var a=document.implementation.hasFeature("Core","2.0"); var b=document.implementation.hasFeature("Core","3.0"); var c=document.implementation.hasFeature("HTML","2.... 阅读全文

posted @ 2016-09-17 23:21 Kooing 阅读(143) 评论(0) 推荐(0) 编辑

scrollIntoView()

摘要: scrollIntoView()看不到时候可以看到 scrollByLines()行 scrollByPages()页 scrollIntoViewIfNeeded()看不到的时候滚动到看到 阅读全文

posted @ 2016-09-17 22:29 Kooing 阅读(152) 评论(0) 推荐(0) 编辑

contains()方法

摘要: 返回一个结点是否是一个结点的后代 console.log(document.documentElement.contains(document.body)); 还有DOM3级的compareDocumentPosition() 会返回掩码 1 无关 2 前 4 后 8 包含 16 被包含 因为会加上 阅读全文

posted @ 2016-09-17 21:49 Kooing 阅读(405) 评论(0) 推荐(0) 编辑

导航