Button Type Submit Onclick Preventdefault Code Example


Example 1: prevent button from submitting form

function myFunc(e){        e.preventDefault(); }

Example 2: prevent button form submit

<button type="button">Button</button>

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable