JSFiddle - React, Tailwind, and code Playground
by nyothecat
HTML
<p>
<label>18_0</label>
<input type="checkbox" id="opt_18_0" />
</p><p>
<label>18_1</label>
<input type="checkbox" id="opt_18_1" />
</p><p>
<label>19_0</label>
<input type="checkbox" id="opt_19_0" name="opt_19_0" />
</p><p>
<label>19_1</label>
<input type="checkbox" id="opt_19_1" name="opt_19_1" />
</p>
JavaScript
function oneortwo() {
console.log("Click! " + this.id)
}
opt_18_0.onclick=oneortwo;
opt_18_1.onclick=oneortwo;
opt_19_0.onclick=oneortwo;
opt_19_1.onclick=oneortwo;