2014-01-15 53 views
0

我需要一個範圍滑塊就像下面的網站有選擇切割,清晰度和色彩有滑塊範圍欄的文本值

http://www.lumeradiamonds.com/diamonds/search?shapes=B,PR,O,M,P,C,E,AS,R,H&

enter image description here

如何添加範圍滑塊的顏色或文本像值良好更好最佳 如果有人告訴我,我怎麼能在我的網站比它非常有幫助實現同一拉我

感謝

+0

問題爲推薦產品/項目是題外話了那麼因爲他們往往產生很多不同的觀點 – Liath

+0

我不明白ü想說什麼 –

+0

嗨,Deepak Goyal。你有沒有找到解決方案? –

回答

0

嘗試了這一點:

function updateTextInput() { 
 
    
 
    
 
    
 
\t var value1 = Number(document.getElementById("range").value); 
 
    var value2 = ""; 
 

 
    if (value1 === 0) { 
 
     value2 = "Blue Diamonds"; 
 
     // Insert more code here for what you intend to do 
 
    } 
 
    else if (value1 === 1) { 
 
     value2 = "Blue Diamonds"; 
 
     // Insert more code here for what you intend to do 
 
    } 
 
    else if (value1 === 2) { 
 
     value2 = "Red Diamonds"; 
 
     // Insert more code here for what you intend to do 
 
    } 
 
    else if (value1 === 3) { 
 
     value2 = "Black Diamonds"; 
 
     // Insert more code here for what you intend to do 
 
    } 
 
    else if (value1 === 4) { 
 
     value2 = "Green Diamonds"; 
 
     // Insert more code here for what you intend to do 
 
    } 
 

 
\t document.getElementById('value2').innerHTML = value2; 
 
    
 
    
 
    
 
}
<form> 
 
<input id="range" type="range" name="rangeInput" min="0" step="1" max="4" value="2" class="white" onchange="updateTextInput(this.value);" onchange="updateTextInput(this.value);" oninput="amount.value=rangeInput.value"> 
 
    <input oninput="rangeInput.value=amount.value" id="box" type="text" value="0" name="amount" for="rangeInput" onkeyup="updateTextInput(this.value);" oninput="amount.value=rangeInput.value" /> 
 
</form> 
 

 
    <p id="value2">Red Diamonds</p>