How to call the function "change" if either of the 5 inputs is checked?
let list = document.querySelectorAll("input");
let price = document.getElementById("price");
function change() {
price.innerHTML = '145';
}
list.onclick = change;
<div>
<input id="input1" type="radio" name="number">
<label class="input" for="input1">1</label>
<input id="input2" type="radio" name="number">
<label class="input" for="input2">2</label>
<input id="input3" type="radio" name="number">
<label class="input" for="input3">3</label>
<input id="input4" type="radio" name="number">
<label class="input" for="input4">4</label>
<input id="input5" type="radio" name="number">
<label class="input" for="input5">5</label>
</div>
<div>
<p>Price: $<span id="price">29</span></p>
</div>