type="radio"

<input> element as "radio buttons"

🔰 HTMLElements<input>

"change" event

const list = $('.ice-cream');

list.onchange = (e) => {
  const result = $('.result');
  result.textContent = `You like ${e.target.value}`;
};

code example

radio buttons in an app

Last updated

Was this helpful?