PHP完全自学手册(珍藏版) 中文pdf扫描版下载
echo $form->field($model, 'Adrop')->dropDownList(
[
'' => 'Please Choose',
'1' => 'item 1',
'2' => 'item 2'
],
[
'onchange' => '$.post(Yii::$app->urlManager->createUrl . "users/A_action"), function(data) {
$("#test_div").html(data)
}'
]
);
控制器
public function actionA_action() {
$data = "TTT";
return $data;
}
转载请注明:谷谷点程序 » yii2 dropDownList ajax change