自个儿对jQuery children 的熟悉

自己对jQuery children 的熟悉

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>

<script type="text/javascript">

$(document).ready(function(){

    $('dd').click(function(){

        var id = $(this).children().attr("rel");

                              $.ajax({

                                   type:"POST",

                                  url:"action.php",

                                  data:{'id':id},

                                  success:function(data,st){  }  

                           })

    });

});

</script>

<title>无标题文档</title>

</head>

<body>

<dl>

  <dt><a href="#"><img src="file/1.gif" rel="lightbox[plants]" width="150px" height="150px"></a></dt>

  <dd><a href="del.php?id=6" rel="6">删除</a> </dd>

</dl>

<dl>

  <dt><a href="#"><img src="file/2.gif" rel="lightbox[plants]" width="150px" height="150px"></a></dt>

  <dd><a href="del.php?id=5" rel="5">删除</a> </dd>

</dl>

</body>

</html>