HTML.form.guide

form action javascript void 0

What does it mean when you have action attribute as javascript void(0)

When creating a form in HTML, the action attribute specifies the URL of the page where the form data should be submitted to. However, in some cases, you may want to use JavaScript to handle the form submission instead of submitting it to a server. In these cases, you can use javascript:void(0) as the value of the action attribute. javascript:void(0) is a special syntax in JavaScript that does nothing when executed.

Continue Reading →