0

我有一个常规日历,其中 td 有一个点击事件处理程序。我返回表格单元格(1-31)的值。我也有一个事件列表 - 每天只有 1 个

<div class="event">
<h2>the title</h2>
<div class="date"> October <span class="day">23</span> 2012 </div>
</div>

我需要做的是当我点击日历上的日期时过滤掉事件。

4

1 回答 1

0

您可以使用ajax

$(document).ready(function(){
 $(".day").on("click",function(){
  $.get("getevents.php?day="+$(this).text(),function(data){
    $("#showing div").html(data);
             //or
    $(".event").find("h2").text(data);   
  })
 })
})
于 2012-10-10T08:26:15.830 回答