html radio button checked
<input type="radio" id="huey" name="drone" value="huey"
checked>
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio-->
html radio button checked
<input type="radio" id="huey" name="drone" value="huey"
checked>
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio-->
html radio label clickable
<!-- Wrap elements without giving them each an ID -->
<label>
<input type="radio" name="mode" value="create">
<i>create table</i>
</label>
<!--You can use <label> elements, which are designed to do exactly that-->
<input type="radio" id="radCreateMode" name="mode" value="create" />
<label for="radCreateMode"><i>create table</i></label>
onclick on radio button
Hi, I think all of the above might work. In case what you need is simple, I used:
<body>
<div class="radio-buttons-choice" id="container-3-radio-buttons-choice">
<input type="radio" name="one" id="one-variable-equations" onclick="checkRadio(name)"><label>Only one</label><br>
<input type="radio" name="multiple" id="multiple-variable-equations" onclick="checkRadio(name)"><label>I have multiple</label>
</div>
<script>
function checkRadio(name) {
if(name == "one"){
console.log("Choice: ", name);
document.getElementById("one-variable-equations").checked = true;
document.getElementById("multiple-variable-equations").checked = false;
} else if (name == "multiple"){
console.log("Choice: ", name);
document.getElementById("multiple-variable-equations").checked = true;
document.getElementById("one-variable-equations").checked = false;
}
}
</script>
</body>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us