JSFiddle - React, Tailwind, and code Playground
by Kevin Faulhaber
HTML
<label>
<input type="radio" name="search_type" id="search_type" value="name">Enter the Name</label>
<input name="tag" type="text" id="search" maxlength="30">
<label>
<input type="radio" name="search_type" id="search_type2" value="all">All</label>
JavaScript
var input1 = document.getElementById('search_type');
var input2 = document.getElementById('search');
var input3 = document.getElementById('search_type2');
input1.onclick = all;
input2.onclick = all;
input3.onclick = all;
function all(){
alert('it works');
}