收藏
回答

获取radio选择的值存入数组


<scroll-view  class='tisone'>

<image src='/pages/images/kapian/one.png' class='imgtm'></image>

<text class='timutitle'>1.当你来到新的群体,想认识更多的朋友,与他们交谈时你会:</text>

<view class='xuanxiang'>

<radio-group class="radio-group" bindchange="radioChange">

<label class="radio"  bindchange="radioChangeA">

<radio value="{{oneone.id}}" checked="{{test.checked}}" class='lableradio'/>{{oneone.radio}}

</label>

<label class="radio" bindchange="radioChangeB">

<radio value="{{onetwo.id}}" checked="{{tets.checked}}" class='lableradio'/>{{onetwo.radio}}

</label>

<label class="radio" bindchange="radioChangeC">

<radio value="{{onestr.id}}" checked="{{test.checked}}" class='lableradio'/>{{onestr.radio}}

</label>

<label class="radio" bindchange="radioChangeD">

<radio value="{{onefor.id}}" checked="{{test.checked}}" class='lableradio'/>{{onefor.radio}}

</label>

</radio-group>

</view>

</scroll-view>


radioChange: function (e) {

console.log('radio发生change事件,携带value值为:', e.detail.value)

},


最后一次编辑于  2018-06-15  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答