<!DOCTYPE html>function displayResult(){var x=document.getElementById("red").value;alert(x);}What color do you prefer?type="radio" name="colors" id="red" value="red"Redtype="radio" name="colors" id="blue" value="blue"Bluetype="radio" name="colors" id="green" value="green"Greentype="button" onclick="displayResult()"Display value of "Red" radio button