Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
TheoryOfNekomata 62cef2d663 Update README il y a 3 ans
cypress Implement cypress il y a 3 ans
src Organize tests il y a 3 ans
test Organize tests il y a 3 ans
.gitignore Initial commit il y a 3 ans
LICENSE Initial commit il y a 3 ans
README.md Update README il y a 3 ans
cypress.json Implement cypress il y a 3 ans
jest.config.js Implement tests il y a 3 ans
package.json Implement cypress il y a 3 ans
tsconfig.json Implement tests il y a 3 ans
yarn.lock Implement cypress il y a 3 ans

README.md

get-form-values

Get the value of a form using HTMLFormElement.elements.

Installation

The library is not yet out on any package manager. Installing through the URL is the preferred way.

Usage

import getFormValues from '@theoryofnekomata/get-form-values';

const form = document.getElementById('form')

// optional, but just in case there are multiple submit buttons in the form,
// individual submitters can be considered
const submitter = form.querySelector('[type="submit"]')

const values = getFormValues(form, submitter)

Tests

The library has been tested on JSDOM through Jest, and the real DOM using Cypress.