How to update html5 range on change of a text input?

前端 未结 6 1470
忘掉有多难
忘掉有多难 2021-02-07 13:59

I have a html5 range input and a text box input. When the range changes, the text box will get updated. But what should I do so that when I put a number in the text box, the ran

6条回答
  •  攒了一身酷
    2021-02-07 14:36

    It's a simple script, just do this:

    
    -1000  1000    
     is the value of the slider now

    (Of course, this only works when you press enter and submit the value to the "onchange")

提交回复
热议问题