Home  >  Article  >  php教程  >  在Yii2中使用Pjax导致Yii2内联脚本载入失败的原因分析,yii2pjax

在Yii2中使用Pjax导致Yii2内联脚本载入失败的原因分析,yii2pjax

WBOY
WBOYOriginal
2016-06-13 08:44:511099browse

在Yii2中使用Pjax导致Yii2内联脚本载入失败的原因分析,yii2pjax

当我用defunkt/jquery-pjax载入Yii2的ActiveForm时发生一个错误,正常情况下是

ActiveForm的两个js应该先载入,而实际情况是

typeError:JQuery(...).yiiActiveForm is not a function。

在github的issues对这个问题已经讨论并得到了解决。

  Pjax首先通过html()执行内联的

以上所述给大家介绍了在Yii2中使用Pjax导致Yii2内联脚本载入失败的原因分析的相关资料,希望对大家以上帮助!

您可能感兴趣的文章:

  • 从零开始学YII2框架(六)高级应用程序模板
  • 从零开始学YII2框架(五)快速生成代码工具 Gii 的使用
  • 从零开始学YII2框架(四)扩展插件yii2-kartikgii
  • 从零开始学YII2框架(三)扩展插件yii2-gird
  • 从零开始学YII2框架(二)通过 Composer 安装扩展插件
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn