jQuery学习笔记

1.理解DOM:

  jQuery最强大的功能之一就是它能够简化在DOM中选择元素的任务,它以对象网络而非纯文本的形式来表现HTML的源代码。

 1 <html>
 2 <head>
 3 <title>the title</title>
 4 </head>
 5 <body>
 6 <div>
 7 <p>This is a paragraph.</p>
 8 <p>This is another paragraph.</p>
 9 <p>This is yet another paragraph.</p>
10 </div>
11 </body>
12 </html>

  这里,<html>是其他所有元素的祖先元素,即其他所有元素都是<html>元素的子元素。对于<head>和<body>元素,<html>也是它们的父元素,而<p>则是<div>的子元素,是其他<p>元素的同辈元素。

posted @ 2015-09-14 18:24  Lemostic  阅读(72)  评论(0)    收藏  举报