yii2判断是不是ajax提交

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39702981/article/details/89350864
public function actionDelete() { 
        if (Yii::$app->request->isAjax) { 
            // request is ajax request 
        } 
        else { 
            // not ajax request 
            // for example redirect 
        } 
} 

猜你喜欢

转载自blog.csdn.net/qq_39702981/article/details/89350864