Article From:

For example, when you do a search box, you are required to click the button to clear the contents of the input, but when you click the button, the input will lose focus. How can you make it not lose focus, that is, you want to make it look like this
Clear the content when you click that x.

Additionally, I did this as if the click event didn’t go in because I didn’t get alert.
I don’t know what this is.
<form action=”” class=”act_search”>

    <input id="search_title"  type="text" value="Activity "/>< P class= "close_btn" id= "BTN" >< B class= "search-close" > < /b>< /p>< /form>

//Empty search


Answer 0:

After losing focus, will it not be enough to focus on it?

No access to alert is that click is not invoked. Look at the style of the B tag.

Answer 1:

xSet a ID, assuming that x is here, and the ID of input is text.




Leave a Reply

Your email address will not be published. Required fields are marked *