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]: https://stackoverflow.com/questions/3336709/custom-range-variable-set-with-jquery-ui-slider
This doesn't look like valid Javascript. Did you omit an enclosing object-literal?

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

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

评论 抢沙发

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

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

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏