$("a.star").click(function(e){
e.preventDefault();
var dataID = $(this).data('id');
$.ajax({
type: "POST",
url: "/engine/save.php",
data: "id=dataID"
success: {
alert("FFS WORK " + data);
}
});
return false;
});
<a href="javascript:void(0)" data-id="7" class="star">test</a>
如何成功發送data.id到save.php(/engine/save.php?id=7)?嘗試了一切,沒有運氣。Ajax&jQuery:發送數據到php腳本
gooby,plz ... :( – asawyer