Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

87
Vistas
El botón Enviar no hizo nada

Aquí estoy tratando de hacer un sitio web de QnA. Así que aquí está el código HTML.

 <!DOCTYPE html> <html> <head> <title>Questions</title> </head> <body> <h1>Questions</h1> <form action="questions.php" method="post" onsubmit='event.preventDefault() ;sendForm1("ask-question")' name="ask-question"> <h3>Ask a Question</h3> <!--Adds textarea field to write a question--> <textarea name="ask-question" rows=5 cols=25 id="your-question">Why do you want to draw art?</textarea><br> <!--Submit button to send question to email and redirects to result.html without opening an email inbox. The problem is I have no idea how to make it send to my email.--> <input type=submit value=Ask name=ask> </form> <a href="/">Go back home</a> <br> <p>No Questions available yet!</p> <h2>Be the First to ask!</h2> <h3>Type the question in the text box then click Ask</h3><a href="faq.html">or go to FAQ</a> </body> </html>

Aquí pongo algunos significados sobre el código y encontrarás la mayoría de los problemas, pero el problema principal es que no puedo hacer que funcione el botón Enviar. O algunos simplemente recargan el sitio web. Aquí está la vista previa del código. Haga clic para ver la vista previa del código html ¿Cómo puedo arreglar esto?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

El código no funciona porque está utilizando onsubmit = event.preventDefault() que impide el comportamiento predeterminado de envío de formularios. Es por eso que no se le redirige a la página result.html . Elimine event.preventDefault() y esto debería estar funcionando

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda