import { domValueById } from "https://deno.land/x/simple_utility@v2.3.1/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 = domDecode("<input id='foo'>");
const result = domValueById(dom, "foo");
Parameters
element: Element