yii如何判断是否是ajax提交

2020-08-24 08:35:35

判断是否是ajax提交的方法如下:

(相关教程推荐:yii框架)

public function actionDelete() {             if (Yii::$app->request >isAjax) {                     // request is ajax request            }             else {                 // not ajax request                 // for example redirect             } }

更多编程相关内容学习,可以关注php中文网编程教程栏目!

相关文章 大家在看