how to make a range slider button do different functions in java script

JavaScript
<input type="range" id="rangeInput" name="rangeInput" min="0" max="20" value="0"
       oninput="amount.value=rangeInput.value">                                                       

<output id="amount" name="amount" for="rangeInput">0</output>
Source

Also in JavaScript: