<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.highlight
{
background-color
: yellow;
}
.gray
{
background-color
: Gray;
}
</style>
<script src="http://code.jquery.com/jquery-1.5.js"></script>
</head>
<body>
<ul>
<li>Look:</li>
<li>This is some text in a paragraph.</li>
<li>This is a note about it.</li>
</ul>
<script type="text/javascript">
$(
"ul li").first().addClass('highlight');
jQuery(
"ul li").first().next().addClass('gray');
</script>
</body>
</html>

相关文章:

  • 2021-09-25
  • 2021-11-01
  • 2021-07-31
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2022-01-25
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-06-13
  • 2021-05-24
相关资源
相似解决方案