Answers for "js get html input range value"

2

js get html input range value

//If you listen for the change event, the function will run only when the mouse is released. That means it won't run while dragging.
//If you listen for the input event, the function will run even while dragging.

const price_range_input = document.querySelector('#range');

price_range_input.addEventListener('input',e=>{
  const price_value = document.querySelector('.price_range_value');
  price_value.innerHTML = e.target.value;
})
Posted by: Guest on April-03-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language