我正在向Ajax添加ID:
function callAjax()
{
jQuery.ajax({
type: "GET",
url: "topics.php?action=details&id=",
cache: false,
success: function(res){
jQuery('#ajaxcontent').html(res);
}
});
}
用这个:
<a href="javascript:;" id="'.$row['id'].'" class="button" onclick="callAjax();">'.$row['post_title'].'</a>
谢谢!