获取radio选择的值存入数组
发布于 7 年前 作者 yansun 4885 次浏览 来自 问答

<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)

},

回到顶部