The only difference between this and the "Method 2" implementation (in the "Option 1" case) is the
<form>...</form> to insert where you want the search
box. Use the following instead.
<form name="searchhi" onSubmit="localSearchHighlight('?h=' + document.searchhi.h.value); return false;">
<p>Highlight words: <input name="h" value="" /></p>
<input type="button" value="Highlight"
onclick="localSearchHighlight('?h=' + document.searchhi.h.value);" />
<input type="button" value="Remove Highlight"
onclick="unhighlight(document.getElementsByTagName('body')[0])" />
</form>
This will produce the following.
Notice that an actual form submission is not required to trigger the highlighting. Also
notice that highlighting can be turned off without a form submission. Finally, notice that the
same modifications can be made to the "Option 2" case of the "Method 2" implementation if
refresh toggling is desired.