有使用一些方法阿贾克斯一样jQuery.ajax({...}) or $.ajax({...})除此之外还有它们的一些简化的版本太像:
$.get()或jQuery.get()
$.post()或jQuery.post()
$.getJSON()或jQuery.getJSON()
$.getScript()或jQuery.getScript()
$ = jQuery两者都是一样的。
当您使用method : 'get',,所以我建议你使用$.ajax({...})或$.get()但要记住,这个脚本上面jQuery的AJAX,否则不会功能工作尝试封闭脚本在$(function(){})文档准备好处理程序。
'abc'如果你能解释一下它
尝试$.ajax()添加此:
$(function(){
$.ajax({
type: "GET",
url: "/billing/add_bill_detail",
data: pars,
dataType: 'html'
success: function(data){
$('#abc').html(data); //
},
error: function(err){
console.log(err);
}
});
});
或$.get():
$(function(){
$.get("/billing/add_bill_detail", {data: pars}, function(data) {
$('#abc').html(data); //
}, "html");
});
或者更简单地使用方法:
$('#abc').load('/billing/add_bill_detail');