页面跳转问题

浏览:3926 发布日期:2018/01/19 分类:求助交流 关键字: ajax 跳转 redirect
html

<a href='{:url("index/index/index")}'>跳转</a>
点右键执行AJAX
$.ajax({
url:'{:url("index/index/index")}',
type:"post",
async:false,
});

php

namespace app\index\controller;
use think\Controller;
class Index extends Controller{
public function index(){
return $this->redirect('http://www.baidu.com');
}
}

为什么<A>标签可以跳转 ajax不能跳转
大神帮帮忙
最佳答案
评论( 相关
后面还有条评论,点击查看>>