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>
2 ответов
+ 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>
+ 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