aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-01-23 19:35:04 +0700
committerShulhan <ms@kilabit.info>2021-01-23 19:35:04 +0700
commit629c97412b6ce72c3fb63fa8dd5c17518a73758b (patch)
treee8d0b087901486b75d2b2161c0c6bf35c93388bf
parent879276b22e3203251a561fb8c4d6d46af9beda74 (diff)
downloadrescached-629c97412b6ce72c3fb63fa8dd5c17518a73758b.tar.xz
_www: add function to clear search result
-rw-r--r--_www/index.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/_www/index.html b/_www/index.html
index aea85e5..f4fb76b 100644
--- a/_www/index.html
+++ b/_www/index.html
@@ -65,6 +65,7 @@
Caches:
<input name="query" />
<button onclick="doSearch()">Search</button>
+ <button onclick="doClearResult()">Clear result</button>
</div>
<div id="result"></div>
<div id="notif"></div>
@@ -117,6 +118,10 @@
onSearchResult(res.data)
}
+ async function doClearResult() {
+ document.getElementById("result").innerHTML = ""
+ }
+
function onSearchResult(dnsRecords) {
const elResult = document.getElementById("result")
elResult.innerHTML = ""