HTML5 input type range show range value

后端 未结 12 1382
野趣味
野趣味 2020-11-28 01:51

I am making a website where I want to use range slider(I know it only supports webkit browsers).

I have integrated it fully and works fine. But I would like to use a

12条回答
  •  长情又很酷
    2020-11-28 02:08

    If you're using multiple slides, and you can use jQuery, you can do the follow to deal with multiple sliders easily:

    function updateRangeInput(elem) {
      $(elem).next().val($(elem).val());
    }
    input { padding: 8px; border: 1px solid #ffffd; color: #555; display: block; }
    input[type=text] { width: 100px; }
    input[type=range] { width: 400px; }
    
    
    
    
    
    
    

    Also, by using oninput on the you'll receive events while dragging the range.

提交回复
热议问题