我試圖讓dojo的HorizontalRangeSlider工作,but a simple example in jsFiddle似乎沒有正確渲染(Firefox 16或Chrome)。無法讓HorizontalRangeSlider與dojo 1.8正確渲染
這是用於多頭滑塊的正確組件嗎?對於1.8的The documentation仍然使用1.6公約。
我試圖讓dojo的HorizontalRangeSlider工作,but a simple example in jsFiddle似乎沒有正確渲染(Firefox 16或Chrome)。無法讓HorizontalRangeSlider與dojo 1.8正確渲染
這是用於多頭滑塊的正確組件嗎?對於1.8的The documentation仍然使用1.6公約。
您的示例缺少樣式表。 dojox/form/RangeSlider
隨附一個,在dojox/form/resources
下找到。
地址:
<link rel="stylesheet"
href="http://ajax.googleapis.com/ajax/libs/dojo/1.8/dojox/form/resources/RangeSlider.css"
/>
你的HTML輸出
這裏是用尺子小提琴的改進版本,編程添加。
var sliderRules = new dijit.form.HorizontalRuleLabels({
minimum: 0,
maximum: 12,
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
labelStyle: "font-size:9px;color: #333",
style: "width:300px;height:30px;"
}, "ruler");
var rangeSlider = new dojox.form.HorizontalRangeSlider({
name: "rangeSlider",
value: [2, 6],
minimum: 0,
maximum: 12,
discreteValues: 12,
style: "width:300px;",
onChange: function (value) {
//alert('change occurred');
}
}, "rangeSlider");
你可以在這裏找到更多的細節。
多頭? – mschr