例子1:给网页中所有的<p>元素添加onclick事件
node2:/var/www/html/jquery#cat t26.html
<p>1111111111</p>
<li>444444444</li>
<p>2222222222</p>
<p>3333333333</p>
<script type="text/javascript" src="jquery-2.2.2.min.js"></script>
<script type="text/javascript" src="t26.js"></script>
node2:/var/www/html/jquery#
node2:/var/www/html/jquery#cat t26.js
$("p").click(function(){ //获取页面中的所有<p>元素,每一个<p>元素添加onclick事件
alert('aaaaa');
})