Definition and Usage. But while jQuery is a powerful library, it can't do everything. There could be many scenarios. This article teaches you two ways that you can use. 2) Dialogue box open successfully , it contains save Button and cancel Button. Create an new file input element and replace the jQuery Form. Targeting Click of Clear Button (X) on Input Field jQuery makes it easy to get your project up and running. We can clear an input field using jQuery easily by making use of the jQuery val() method. The is used for input fields that should contain a date. You can clear out their values by just setting value to an empty string: var1.value = ''; var2.value = ''; Share Improve this answer Follow answered Mar 11, 2013 at 16:47 Rob M. When we click on the clear button the text inside the In your clear function just call the search function after clearing the input. An alias for .type('{selectall}{backspace}') Syntax Usage Correct Usage Incorrect Usage Arguments options Guides API Plugins Examples FAQ LearnLearn GitHub Open main menu Guides API Plugins Examples To reset text, number, search, textarea inputs: $ ('#shares').val (''); To reset select: $ ('#select-box').prop ('selectedIndex',0); To reset radio input: $ ('#radio-input').attr Clear Dialouge box input field value. 3. The tag helps you to take user input using the type attribute. You can easily reset all form values using the HTML button using attribute. Both are used to proceeds clear concept on input fields. Click on the input field to clear it: Clear Input Field on Focus Example