摘要: document.write 的执行分两种情况: 第一种:dom加载已完成 1. 执行 document.open() (即会清空document) 2. 执行 document.write() 3. 执行 document.close() 看例子 一秒后整个document会清除,包括script 阅读全文
posted @ 2017-04-05 21:51 savokiss 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 假设有如下代码结构,想要查找 Piggy 那个 p 使用 nth-child 是不正确的: 使用 nth-of-type 是正确的 : 即: nth-child 用人话讲: 1. 查找某个p元素 2. 这个元素是它父级节点的第二个元素 nth-of-type 用人话讲: 1. 查找所有p元素中第二个 阅读全文
posted @ 2017-04-05 11:02 savokiss 阅读(169) 评论(0) 推荐(0) 编辑