Skip to main content
Module

x/simple_utility/mod.full.ts>getValueById

Simplify processing for Deno.
Go to Latest
function getValueById
import { getValueById } from "https://deno.land/x/simple_utility@v2.0.8/mod.full.ts";

Get value by id search. .value for <input>, .textContent for <textarea> and .value of .selected for <select> <dataset>.

Examples

Example 1

const dom = parseDOM("<input id='foo'>");
const result = getValueById(dom, "foo");

Parameters

element: Element
id: string

Returns

string