import { getValueById } from "https://deno.land/x/simple_utility@v2.0.5/src/deno_ext/dom.ts";
Get value by id
search.
.value
for <input>
, .textContent
for <textarea>
and .value
of .selected
for <select>
<dataset>
.
Examples
Example 1
Example 1
const dom = parseDOM("<input id='foo'>");
const result = getValueById(dom, "foo");
Parameters
element: Element