我正在使用引导滑块,我正在做:
Days: <b>1</b> <input id="days" type="text" class="span2" value="" data-slider-min="1" data-slider-max="31" data-slider-step="1" data-slider-value="[0,31]"/> <b>31</b>
启动它$("#days").slider({});
那行得通,但是如果我想创建一个几个月的滑块,使用字符串而不是数字怎么办?
Months: <b>January</b> <input id="months" type="text" class="span2" value="" data-slider-min="0" data-slider-max="2017" data-slider-step="1" data-slider-value="[January, February, March]"/> <b>March</b>
启动它$("#months").slider({});
这给出了:
错误:传入的输入值“[January, February, March]”无效