<html>
<head>
<script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("p").eq(-2).css("background-color","yellow");
});
</script>
</head>
<body>
<h1>Welcome to My Homepage</h1>
<p>My name is Donald.</p>
<p>Donald Duck.</p>
<p>I live in Duckburg (will be selected, because it is the 2nd element from the end of the selected elements).</p>
<p>My best friend is Mickey.</p>
</body>
</html>