3
如何使用Pjax
帶有POST請求的Yii 2
?Yii 2中的Pjax帶POST請求
我試圖那樣做,但頁面重新啓動反正:
<?php Pjax::begin(['id' => 'some-id', 'clientOptions' => ['method' => 'POST']]);?>
...
some content
...
<?=Html::a('', ['cart/cart'],
['class'=>'close1',
'data' => [
'method' => 'post',
'params' => [
'idCartToDelete' => $product->idCart,
],
]
]
)
?>
...
some content
...
<?php Pjax::end(); ?>