javascript - trying to submit form with submit button as button -
i trying submit form , not working , want submit button disabled once clicked.
<form action="buy" method="post" > <input type="hidden" name="tid" value="${tid}"/> <td align="center" valign="middle"> <button onclick="this.disabled = true; document.getelementbyid('up7913').disabled = false;" type="submit" name="down7913" id="down7913">subscribe now</button></td> </form>
bind submit
event , disable button.
document.getelementbyid('form').addeventlistener('submit', function(event) { event.preventdefault(); this.down7913.disabled = true; // handle post request });
Comments
Post a Comment