I have
input type="text" c
id ="groka" I do not understand how to delete from there the text I tried by clicking in the function
$("#groka").val() == ''; But something does not rob ...
I have
input type="text" c
id ="groka" I do not understand how to delete from there the text I tried by clicking in the function
$("#groka").val() == ''; But something does not rob ...
Not robs because
$("#groka").val() == '' There is a comparison of the value of this input with an empty string. You need to write like this:
$("#groka").val('') because val () is both a getter and a setter of the input value. If the function is called without arguments, then you get the value, if with an argument, then you set.
By the way, the fun part is a typical error, when instead of the equality operator an assignment operator is written, but not vice versa))
Try this:
$ ("# groka"). val ('');
Source: https://ru.stackoverflow.com/questions/240874/
All Articles