我想屬性href
添加到URL的末尾:jQuery的添加ATTR結束串
這應該是很容易的。這就是我所擁有的,但我認爲是錯的。
$('.delete-code').click(function() {
var row = $(this).parent().parent();
$.ajax({
type: "POST",
url: "http://website.com/admin/home/deleteCode/"+$(this).attr('href'),
data: $(this).attr('href'),
success: function() {
$(row).hide();
}
});
return false;
});
這工作時,在href
你能發佈完整的代碼嗎? – rahul 2010-01-08 06:35:58
你會得到什麼輸出以及你期望輸出什麼? – cobbal 2010-01-08 06:36:01
已更新。這是一個簡單的Ajax調用。 – 2010-01-08 06:59:01