Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
function domValueByRadioActive
import { domValueByRadioActive } from "https://deno.land/x/simple_utility@v2.2.1/src/deno_ext/dom.ts";

Get value of .checked in group of radio buttons.

Examples

Example 1

const dom = domDecode("<input type='radio' name='foo' value='1' checked><input type='radio' name='foo' value='2'>");
const result = domValueByRadioActive(dom, "foo");

Parameters

element: Element
name: string

Returns

string