简明 Python 教程: http://woodpecker.org.cn/abyteofpython_cn/chinese/
一开始通读一遍这个很不错,是最简单明确的 Python 教程,最适合快速了解。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var a = document.getElementById("eq").offsetTop; | |
| if (a >= $(window).scrollTop() && a < ($(window).scrollTop()+$(window).height())) { | |
| alert("div在可视范围"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 冒泡事件就是点击子节点,会向上触发父节点,祖先节点的点击事件。 | |
| 下面是html代码部分: | |
| <body> | |
| <div id="content"> | |
| 外层div元素 | |
| <span>内层span元素</span> | |
| 外层div元素 | |
| </div> |