Blogger Information
Blog 10
fans 0
comment 0
visits 10348
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
parentNode和offsetparent
亘古匆匆的博客
Original
760 people have browsed it

这里我们记录和分析一下js中的parentNode和offsetparent

第一个parentNode我们经常用,知道是获取元素父节点的方法,但offsetparent就不经常用了,我也是刚学到,所以在这里记录一下,以防以后用到,而自己又刚好忘掉。

js中的parentNode可以获取子元素的父节点

offsetparent可以获取被定位的元素的父节点

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!