level 1
小菜在骑行
楼主
在学thinkphp的时候,在许愿墙用$post提交的时候出现了问题,问题如下:
这是js:
$.post(handleUrl, {username : username.val(), content : content.val()},
function (data){ }, 'json');
这是html中获得url:
<script type="text/javascript">
var handleUrl = '{:U("Index/Index/handle", '', '')}';
</script>
这是控制器:
//异步发布处理
public function handle(){
var_dump(IS_AJAX);
}
2015年12月09日 05点12分
1
这是js:
$.post(handleUrl, {username : username.val(), content : content.val()},
function (data){ }, 'json');
这是html中获得url:
<script type="text/javascript">
var handleUrl = '{:U("Index/Index/handle", '', '')}';
</script>
这是控制器:
//异步发布处理
public function handle(){
var_dump(IS_AJAX);
}