HTML Slider增加2(偶数)

时间:2014-04-22 14:51:14

标签: html slider

我有一个用于创建花瓣的滑块。增加范围是1.有没有办法让滑块在2&#39>中增加

滑块代码:

<label for="pettalValues">Number of Pettals</label>
<input class"bar" type="range" data-theme="a" id="pettalValues" min="4" max="10" value="6"  data-mini="true" onchange="drawFlower()"/>

创建Pettals的代码:

for (var i = 0; i < numberOfPetals; i++)
    {
      CREATES Ellipse SVG and Rotates Depepending on number of Petals Specified.
     }

1 个答案:

答案 0 :(得分:0)

更改

for (var i = 0; i < numberOfPetals; i++)

 for (var i = 0; i < numberOfPetals; i+=2)