【发布时间】:2008-12-28 03:25:49
【问题描述】:
我正在尝试进行 ajax 调用以获取会话数据,以便在页面像这样加载后插入到我的页面中
jQuery(function(){ // Add Answer
jQuery(".add_answer").livequery('click',function(){
var count = $(this).attr("alt");
count++;
var count1 = count-1;
$.get('quiz/select', function(p_type){ // Ajax Call for Select Data
$(this).parents('div:first').find('.a_type_'+count1+'').after('' + p_type + '');
$(this).attr("alt", count);
});
});
});
找到了我正在调用的文件,但它的内容没有被 'p_type' 打印出来
并且函数的$(this).attr("alt", count); 部分没有执行
注意:我的框架使用 CodeIgniter,js 使用 jquery
【问题讨论】: