1

I have a simple problem. How do I code a line to clear the search input history whenever I want to type in something new into the search box? I am writing a form which interacts with the YouTube search bar so whatever I type inside the search box, it will link to YouTube.

Below is the image file in which shows the input history I have typed in and it does not clear whenever I refresh the browser. I am fairly new at html.

Search Input :

enter image description here

<table class="tborder" cellpadding="$stylevar[cellpadding]" 
cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="right">
 <tr>
  <td class="thead" width="100%">
   <div style="text-align: left;">
    <strong>YouTube Search</strong>
   </div>
  </td>
 </tr>
 <tr>
  <td class="alt1" width="100%">
  <div class="smallfont" style="text-align: left;">
   <form id="vb_yt_search-form" action="http://www.youtube.com/results" method="get" target="_blank">
    <input id="vb_yt_search-term" name="search_query" type="text" maxlength="128" />
<select name="search_type">
 <option value="" >Videos</option>
 <option value="search_users">Channels</option>
</select>
<input type="submit" value="Search" />
</form>
</div>
 </td>
</tr>
</table>
1
  • Try reading this Commented Jan 10, 2019 at 8:47

2 Answers 2

2

You should use attribute autocomplete="off"

Sign up to request clarification or add additional context in comments.

Comments

0

The best way is

<form autocomplete="off">



</form>

Hope that helps

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.