JSFiddle - React, Tailwind, and code Playground
by S.M. Murad Hasan Tanvir
HTML
<input id="p1" type="radio" name="select" value="25"> product1 $25 3week<br />
<input id="p2" type="radio" name="select" value="55"> product2 $55 4week<br />
<input id="p3" type="radio" name="select" value="75"> product3 $75 3week<br />
<input id="t1" type="text" name="product" value="">
<input id="t2" type="text" name="price" value="">
<input id="t3" type="text" name="duration" value="">
JavaScript
$(function(){
$("input[type=radio]").on("change", function(e){
var getTxt = e.currentTarget.nextSibling.data;
values = getTxt.split(" ");
//alert(getTxt);
$("input[name=product]").val(values[1]);
$("input[name=price]").val(values[2]);
$("input[name=duration]").val(values[3]);
})
})