I have a simple form, let's say it takes an email address. As soon as the form is submitted, the message stack notifies the user that his address has been sent successfully. The problem is that after sending the address the form field with the email address still contains the email address that was entered by the user, how would I reset this field? Should I use JavaScript for this?
thanks
window.onload = function () { for(var f in document.getElementsByTagName("form")) f.reset(); }
, , , onload, . , ( 2 3). , , JavaScript, .
$(':input','#myform') .not(':button, :submit, :reset, :hidden') .val('') .removeAttr('checked') .removeAttr('selected');
: jQuery
jQuery: http://jquery.com
Source: https://habr.com/ru/post/1714354/More articles:Developing a new application with .NET? - c #Loading data into a combo box is slow - performanceRegex match, pretty simple: - regexBest way to parse a table in Ruby - ruby | fooobar.comXSLT time-consuming without browser freezing? - xsltDrag and drop simulation? - windowsGeneral Compilation Error Overload Method in VB - genericsThe right way to get out of the original assembly in a multi-part cmake project - cmakeКак форматировать URI при привязке изображения в Silverlight? - uriWhat is the use of explicitly calling getters and setters like "get ..." and "install ..."? - language-agnosticAll Articles