I am looking for a way to clear old values from a text field when I refresh a page using jquery. I tried this code but it did not work.
$('#flip_list_search').value = "";
try it
$("#flip_list_search").val('');
Use . val ()
$('#flip_list_search').val('');
or
$('#flip_list_search')[0].value ='';
.valueworks with native DOM $('#flip_list_search')object is jQuery object
.value
$('#flip_list_search')
$('#flip_list_search')[0]to get the first native DOM object
$('#flip_list_search')[0]
$("input#flip_list_search","#Your_form_Id").val('');
. . #Your_form_Id - , . jQuery #Your_form_Id DOM.
:
$('#flip_list_search').val("");
Source: https://habr.com/ru/post/1534111/More articles:Is there a way to set the AUTO_INCREMENT property in an existing table column in Vertica? - sqlRegular expression for (= string) - pythonElevateZoom not working in bootstrap modal - jqueryC ++ variation patterns unresolved external virtual abstract - c ++using prismjs in an angular app - javascriptFault Syntax Error: Unexpected token: getJSON - jsonWhy does the Host tab not show the icon in android? - androidSpring + Thymeleaf: время в пользовательском часовом поясе - javaIs it safe to disable on flutes with c ++ - c ++Will using IIS instead of IIS Express speed up startup time for a VS2013 WebAP application running locally? - asp.netAll Articles