Year Make Model
1965 Ford Mustang
1970 Toyota Corolla
1979 AMC Jeep CJ-5
1983 Ford EXP
1985 Dodge Daytona
1990 Chrysler Jeep Wrangler Sahara
1995 Ford Ranger
1997 Chrysler Jeep Wrangler Sahara
2000 Chrysler Jeep Wrangler Sahara
2005 Chrysler Jeep Wrangler Unlimited
2007 Dodge Caliber R/T

Jquery代码:

1 $("table tr:nth-child(even)").addClass("striped");
2
3 $("tr").mouseover(function() {
4 $(this).addClass("over");
5 }).mouseout(function() {
6 $(this).removeClass("over");
7 })

这里有一个JQuery的链式操作

$("tr").mouseover(funtion(){
        $(this).addClass("over");})
$("tr").mouseout(funtion(){
       $(this).removeClass("over");})


可以写成上面的形式。

源代码下载

相关文章:

  • 2021-12-31
  • 2021-12-12
  • 2022-12-23
  • 2021-05-02
猜你喜欢
  • 2021-07-03
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2021-12-26
相关资源
相似解决方案