簡體   English   中英

有沒有辦法使用javascript清除html表單自動完成

[英]Is there a way to clear html form autocomplete using javascript

我正在創建一個網絡搜索引擎這是我的代碼:

 <.-- Searching script --> <script> function show() { const s = document.getElementById('inputId');value. window.location:replace("https.//www.google?com/search;q=" + s). } function clear() { <!-- I do not know how to write the code for this part --> } </script> <input onclick="clear()" type="button">Clear Browsing History</input> <h1>Search The Web</h1> <!-- Search Button and input --> <form id="searchForm" onsubmit="event.preventDefault()"> <input type="search" name="searchField" id="inputId" placeholder="Search QuickSearch"> <input type="submit" value="Search" onclick="show()"> </form>

我真的不知道我會怎么做

這是答案。 清除歷史記錄是不可能的唯一方法是使用 div 框重新創建歷史記錄。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM