add clear button to text input

Solutions on MaxInterview for add clear button to text input by the best coders in the world

showing results for - "add clear button to text input"
Corra
18 Feb 2020
1<input type="search" placeholder="Search..."/>
2
3<style>
4  input[type=search]::-webkit-search-cancel-button {
5    -webkit-appearance: searchfield-cancel-button;
6  }
7
8  input[type=search] {
9      -webkit-appearance: none;
10  }
11</style> 
Joséphine
14 Jan 2016
1<!DOCTYPE html>
2<html lang="en">
3    <head>
4        <title>SO question 2803532</title>
5        <script src="http://code.jquery.com/jquery-latest.min.js"></script>
6        <script>
7            $(document).ready(function() {
8                $('input.deletable').wrap('<span class="deleteicon" />').after($('<span/>').click(function() {
9                    $(this).prev('input').val('').trigger('change').focus();
10                }));
11            });
12        </script>
13        <style>
14            span.deleteicon {
15                position: relative;
16            }
17            span.deleteicon span {
18                position: absolute;
19                display: block;
20                top: 5px;
21                right: 0px;
22                width: 16px;
23                height: 16px;
24                background: url('http://cdn.sstatic.net/stackoverflow/img/sprites.png?v=4') 0 -690px;
25                cursor: pointer;
26            }
27            span.deleteicon input {
28                padding-right: 16px;
29                box-sizing: border-box;
30            }
31        </style>
32    </head>
33    <body>
34        <input type="text" class="deletable">
35    </body>
36</html>
37
queries leading to this page
button to clear input boxinput html remove clear buttonclear text field inputhtml clear button to remove input valuesclear input field with a buttonclear input html buttonhtml add clear to input textclear button in input field htmlclear search field htmlhow to create a button at the end of an input box with jqueryhtml button clear input fieldbutton clear input fieldkeyboard button to clear input boxbutton clear input in anadd a clear button to inputbutton onclick clear text fieldhow to clear text input formremove clear button hmtml inpittextbox with clear buttoncss input text clear buttoninput field with clear buttoninput button clearhow to clear input type html buttonclear text of input field on button presswebkit html5 clear button in the input fieldhow to clear input field on button clickbutton to clear fieldsform button clear fieldsclear input box after button clickinput type text with clear buttoninput field clear buttonbutton to cleare a text boxhtml clear inputs on button clicclear input with buttonwhen we click on add button i want input box clear in javascriptinput text box add clear buttonclean button input htmlclear input fields using buttoncss add clear button to inputinput clearclear button inside text boxhtml clear input boxspan with cross to clearplace corss inside in textbox to clear textjavascript button clear inputclear button input javascriptcss input clear buttonhtml input file with clear buttonclear input buttoninput with clear button csshtml my button clean the inputinput add clear buttonclear input field on button pressclear input buttionbutton type clearhtml how to create a clear button that sets all inputs to emptybutton clear text htmltextfield clear buttonhow to clear all text fields with one buttoninput clear buttonclear button for input fieldhow to style button clear inside an inputinput clear button csshtml input clear buttoncss input with clear buttonclear text after user input in htmlbuefy input clear buttonedit clear button properties in text fieldhtml button to clear inputclear button in text inputinput type x button to clear contentclear input with button clickclose button for an input element to clear texttext input with clear buttonhave close button inside input textbutton to clear input fieldplain text button to clear user inputhow to clear button input type filehtml textbox clear buttonhow to clear input field after buttonwhen write in input field delete buttuon showhtml clearable inputjavascript add clear button to inputadd clear button to textinputhow to reset the form textbox value in html with clearbuttonclear button on inputhow to create html form clear text buttonbutton type resetadding a clear input button html csshtml input search clear buttonbutton clear inputhow to get clear button inputbutton to clear all inputs ina faormadd a cross button to empty an input fieldhow to put cancel sign in an input 3fadd clear button to text inputinput with clearinput clear input buttonhow to get that clear button inputclear all button to clear input filed valueshtml button to clear input fieldinput clear button uxinput text clear buttonhtml input text on button click clear valueinput with clear buttonhow to clear all data in input fields using button in htmlclear input field html buttonhave a button to clear textboxforinput text hide clear buttonclearable inputinteracting with an input clear buttoninput type data clear buttonclear button inside input field add button to clear inputclear button inside inputhtml input clear button in inputhtml clear button in inputinput html clear buttonclear button for input field qjueryclear input field on button clickonbutton click clear input fieldhow to input determined and clear buttonon click of button clear input fieldhow to clear the fields in a html form using clear buttoninputdecorator clear buttoncreate cancel button in inputbox csshtml form input clear buttonhow do i put a clear button inside my html text input boxadd clear button to text input