0
这是我在yii2如何在yii自定义单选按钮中设置onclick事件?
<?php
echo $form->field($ProductShipping, 'id_shipping')->radioList(
['1'=>'Free', '2'=>'Pickup','3'=>'Country Wise','4'=>'API'],
['item' => function($index, $label, $name, $checked, $value) {
$return = '<label class="radio">';
$return .= '<input type="radio" name="' . $name . '" value="' . $value . '">';
$return .= '<label>' . ucwords($label) . '</label>';
$return .= '</label>';
return $return;
}
]
)->label(false);
?>
HTML代码中的自定义单选按钮如何设置这个自定义单选按钮的onclick事件?
大,帮我.. !! –
在这种情况下,如果我警告(this.id)它显示div id,我如何选择单选按钮值? –
使用javascript val()函数 – Bfcm