get values of array

I have this code, and my objective is get the array object. No errors in firebug, but no value is showed (always `undefined`) . What is the correct way to do this ? 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); In jquery looks like: 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]); } }); from [here][1] [1]:
This doesn't look like valid Javascript. Did you omit an enclosing object-literal?

以上就是get values of array的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准