开发者

Detecting HTTP 204 status of submitted form

开发者 https://www.devze.com 2023-03-06 15:19 出处:网络
Is there a way to have a JavaScript event or check see if a su开发者_运维知识库bmitted form got as response status HTTP 204?Short answer: If it\'s a regular <form> submit, no.

Is there a way to have a JavaScript event or check see if a su开发者_运维知识库bmitted form got as response status HTTP 204?


Short answer: If it's a regular <form> submit, no.

You can only detect the response code if you use XHR.


Not possible if not Ajax form submit. In this case logic needs to be handeled on the server and redirect to appropriate page.

0

精彩评论

暂无评论...
验证码 换一张
取 消