Skip to content Skip to sidebar Skip to footer

What Is This Format For Post Method For Form?

I saw this code on the internet, and I'm a little puzzled of what it does, particularly on the onsubmit portion.

Yes.

and then post sends it to where action is pointing to (#)

No.

If the value returned by the onsubmit function is a true value, then it will submit the form as normal. It it returns a false value, then it will prevent the form from submitting.

If I'm not mistakent # means it isn't being sent anywhere.

No. The relative URL # is a reference to the top of the page. Using it as a form action doesn't really make sense since a new page load will be triggered anyway. It will just submit to the URL of the current page.

Post a Comment for "What Is This Format For Post Method For Form?"