0

envio duplicado de formulario JavaScript

hola, tengo el siguiente codigo y quiero evitar que se mande el formulario por duplicado, sustituyendo la tecla "enviar" por "enviando....". gracias. <DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>esudiando</title> <form id="formulario" action="#"> <input type="button" value="Enviar" onclick="this.disabled=true; this.value= /’Enviando ... /’; this.form.submit()" /> </form> </head> </html>

1st May 2017, 1:45 PM
Miguel Angel Espeso Alvarez
Miguel Angel Espeso Alvarez - avatar
2 odpowiedzi
+ 4
google translate: Sending a duplicate JavaScript form Hello, I have the following code and I want to avoid having to send the form in duplicate, replacing the "send" key with "sending ....". Thank you. <DOCTYPE html> <Html> <Head> <Meta charset = "UTF-8"> <Title> Browsing </ title> <Form id = "form" action = "#"> <Input type = "button" value = "Send" onclick = "this.disabled = true; this.value = / 'Sending ... /'; this.form.submit ()" /> </ Form> </ Head> </ Html>
1st May 2017, 1:50 PM
Burey
Burey - avatar
+ 2
probably the problem is behind the scene example, if you record this data in a database, and duplicate data, try defining a primary key in your table
1st May 2017, 2:40 PM
⏩▶Clau◀⏪
⏩▶Clau◀⏪ - avatar