JSFiddle - React, Tailwind, and code Playground
HTML
<fieldset id="question1">
<legend>What is the answer to this question?</legend>
<label><input id = "rightId" type="radio" name="q1" value="right" onclick="javascript:check()"> Right answer</label>
<label><input type="radio" name="q1" value="wrong"> Wrong answer</label>
<ul>
<li><a href="https://www.quora.com/Ruby-programming-language/How-will-recent-Ruby-Rails-security-issues-affect-community-and-future" target="_blank">Check Quora</a> </li> </ul>
</fieldset>
<input type="button" id="answer">
JavaScript
function check(){
if(document.getElementById("rightId").selected){
log("correct answer");
}
}