我有这个代码,我的目标是获取数组对象。
萤火虫没有错误,但没有显示任何值(总是undefined
)。这样做的正确方法是什么?
var sizes = ["a","b","c","d","e","f"];
var s = new dijit.form.HorizontalSlider({
value:1,
name:"i"+[i],
onChange:function(sizes, val){
dojo.byId('value'+[i]).value = sizes[val];
},
minimum:1,
maximum:sizes.length -1,
discreteValues:sizes.length,
},node);
在jquery看起来像:
var sizes = ["0","2","4","6","8","10","12","14","16","18","16W","18W","20W"];
$("#slider-size .slider").slider({
min: 0,
max: sizes.length - 1,
step: 1,
slide: function(event, ui) {
$(".rsize").text(sizes[ui.value]);
}
});
来自here
答案 0 :(得分:0)
minimum:0,
是问题所在。感谢