yii2 how to use pjax when hyperlink is not in pjax

后端 未结 3 879
名媛妹妹
名媛妹妹 2021-01-21 09:09

To use pjax in yii2, just like:


 \'btn btn-lg btn-primary\']);?>
&         


        
3条回答
  •  无人及你
    2021-01-21 09:45

    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:

提交回复
热议问题