How to set a Header field on POST a form?

前端 未结 8 1905
情书的邮戳
情书的邮戳 2020-11-27 04:08

How can I set a custom field in POST header on submit a form?

8条回答
  •  半阙折子戏
    2020-11-27 05:04

    You could use $.ajax to avoid the natural behaviour of

    . You could, for example, add an event to the submission button and treat the POST request as AJAX.

提交回复
热议问题