Avatar of Whing Dela Cruz
Whing Dela Cruz
Flag for Anguilla

asked on 

Html value of radio

Hi experts, I want to get the value of radio by name and put it in an alert. My code below won't work.

<!DOCTYPE html>
<br>Rush Order
<input type="radio" name="kind" value="rush">
<input type="radio" name="kind" value="regular">
<button onclick="Get()">Try</button>

function Get()
      var x = document.getElementByName("kind").value

Avatar of undefined
Last Comment
Whing Dela Cruz

8/22/2022 - Mon