I read several posts, including this and, but I can't seem to get the input box to clear after posting. What is the easiest / easiest way to do this?
I currently have this:
$(document).ready(function(){ $('form[name=checkListForm]').on('submit', function() {
My HTML:
<!DOCTYPE html> <html > <head> <meta charset="UTF-8"> <link rel="stylesheet" href="stylesheet.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <script type="text/javascript" src="script.js"></script> </head> <body> <h2>To Do</h2> <form name="checkListForm"> <input type="text" name="checkListItem" /> <button type="submit" id="button">Add!</button> </form> <br/> <div class="list"></div> </body> </html>
Alanh source share