0
我有问题ajax。当我不能在AJAX使用的href属性POST方法.. 发送值这个阿贾克斯我的源代码...在CI上使用Post方法在ajax上发送href值hp
function show_TIM(){
var img = "<img src='"+site_url+"public/images/load.gif' align='center'>";
$("#TIM").html(img);
event.preventDefault();
$.ajax({
type:"post",
url: site_url+'index.php/controller/function/#needvaluerighthere',
data: {
link : $(this).attr('href'),
},
success:function(msg){
$('#TIM').html(msg);
oTable = $('#example').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
'iDisplayLength': 100
});
}
});
}
和HMTL代码
<a href="'.$row['TIM_KE'].'" class="link" style="text-decoration: none;" data-toggle="modal" data-target=".TIM" data-artid="'.$row['TIM_KE'].'" onclick="show_TIM();">
我试图抓住$行[ “TIM_KE”]用Ajax和值发送到控制器... 总之,我使用CodiIgniter ... 请帮助我..
千恩万谢的参考,你是对的... – sidzaky 2014-09-06 11:24:01