http://html5doctor.com/html5-custom-data-attributes/ http://api.jquery.com/data/ <input type="range" class="mtslide" name="slider1" id="slider1" min="0" max="10" value="0" data-price="20.00" data-id="1"> <input type="range" class="mtslide" name="slider2" id="slider2" min="0" max="10" value="0" data-price="30.00" data-id="2"> <input type="range" class="mtslide" name="slider3" id="slider3" min="0" max="10" value="0" data-price="50.00" data-id="3"> $('.mtslide').each(function (index, Element) { var obj = { id: $(Element).data("price"), price: $(Element).data("price"), number: $(Element).val() }; arr.push(obj); });
data attribute
猜你喜欢
转载自wang-peng1.iteye.com/blog/2203422
今日推荐
周排行