form-default-submit

1.0.2 • Public • Published

form-default-submit

In case of more submit inputs, browser will default submit first of them. Sometimes the submit inputs are dynamically generated and we need to set as default another submit (not the first one).

Everything what you need to do is import this library into html code after jquery and set default attribute to that submit, which you want to set as default:

<input type="submit" name="submit1" />
<input type="submit" name="submit2" />
<input type="submit" name="submit3" default="" /> // add default attribute
<input type="submit" name="submit4" />

Readme

Keywords

Package Sidebar

Install

npm i form-default-submit

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

12.2 kB

Total Files

9

Last publish

Collaborators

  • acqsk