如何获取微信小程序中单选按钮的信息:
1、如下的xml代码,此代码是一组单选按钮的实例代码:
举例来获取 此组代码所选中的信息,在xml代码中先绑定一个方法“
bindchange="item_change"
” 分别设置各个单元格的value值:
<swiper bindchange='swiper_change' current='{
{currentid}}'>
<block wx:for="{
{details}}">
<swiper-item>
<view class='content'>{
{index+1}}{
{item.content}}</view>
<radio-group class="radio-group" bindchange="item_change" data-id="{
{item.id}}">
<label class="item">
<radio value="a#{
{item.scorea}}"/><text>A{
{item.itema}}</text>
</label>
<label class="item">