鍍金池/ 問答/Linux  HTML/ 微信小程序 checkbox循環(huán)

微信小程序 checkbox循環(huán)

clipboard.png

怎樣能在bindchange 綁定的函數(shù)中獲得到對(duì)應(yīng)checkbox的 index, 用的data-index=“{{index}}” 放在標(biāo)紅的這兩處都不好用,獲得的dataset是空的, index=“{{index}}” 獲得的同樣是空的

回答
編輯回答
墨小羽

你在bindchange函數(shù)里面 是這樣獲取的嗎 event.currentTarget.dataset

2018年9月1日 21:37