Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

170
Visualizações
Do AJAX operations need the action and post attributes in <form> the way an HTML post submissions does?

I understand how the action and method attributes work when submitting a form, but is it needed in AJAX operations?

Basically looking for the difference between using AJAX to submit a form to a server versus using HTML post.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

AJAX doesn't need a form at all, it is a way of sending a request from the browser to the server which can contain any data you want. For instance, you can track where the user moves their mouse, and send this data to your server every few milliseconds.

If you are using it to send the contents of a form, then technically no, you don't need action and method attributes, because you can read the form fields directly, and send them wherever you like. However, it's usually a good idea to have them anyway, if only as a fallback for if the JavaScript goes wrong, or the user has JavaScript switched off.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda