To use pjax in yii2, just like:
= Html::a(\"Refresh\", [\'site/index\'], [\'class\' => \'btn btn-lg btn-primary\']);?> &
I think this can solve your problem.
refresh refresh a registerJs( '$("document").ready(function(){ $(".my-btn").on("click", function() { $.pjax.reload({container:"#greet"}); }); });' ); ?> 'greet']); ?> Current time: = time() ?>