Skip to main content
Module

x/simple_utility/mod.full.ts>getValuesByName

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

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

Examples

Example 1

const dom = parseDOM("<input name='foo'>");
const result = getValuesByName(dom, "foo");

Parameters

element: Element
name: string

Returns

string[]