标签:
方式一:
function hits1(troops) {
var troops = troops;
var ajax=Ajax();
var url = ‘xxx.php‘;
ajax.post(url,{‘troops‘:troops},function(data){
$(‘.dw_hits1‘).html(data);
});
}
方式二:
function hits1(troops) {
var troops = troops;
var url = ‘<{$smarty.const.ROOT_DOMAIN}>/hits1_ajax.php‘;
$.post(url,{‘troops‘:troops},function(data){
$(‘.dw_hits1‘).html(data);
},‘json‘); //可以设置返回的数据格式
}
标签:
原文地址:http://www.cnblogs.com/wangyuman26/p/4693656.html