可能
<img id="imageid"/><br/>
<input type="radio" id="opt1" name="rgroup" onclick="setpic(1);">
<label for="opt1">Option 1</label><br>
<input type="radio" id="opt2" name="rgroup" onclick="setpic(2);"/>
<label for="opt2">Option 2</label><br>
function setpic(x) {
img = document.getElementById("imageid");
if (x==1) {
img.src = "https://www.cwb.gov.tw/V8/assets/img/weather_icons/weathers/svg_icon/day/02.svg";
}
else if (x==2) {
img.src = "https://www.cwb.gov.tw/V8/assets/img/weather_icons/weathers/svg_icon/night/04.svg";
}
}