提交后如何在输入中留下文本搜索

how to left text search in input after submit

我有搜索输入。当我写一个数字来查找某些东西(这是一个 HTTP 请求)时,我得到了一些结果,但我输入的数字消失了。我怎么能离开它?

     div class="control is-expanded">
          <input
            name="request_id"
            class="input"
            placeholder="Request ID"
          />
        </div>
        <div class="control">
          <input type="submit" name="submit" class="button is-link" />
        </div>

beckent 上的 HTTP 请求,我没有写。我只做前端。我可以更改吗?

HTML:

<form method="post" action="" onSubmit="return saveComment();">
    <input type="text" name="request_id" class="input" placeholder="Request ID from Furia" />
    <input type="submit" name="submit" class="button is-link" />
</form>

JavaScript:

document.getElementById("request_id").value = localStorage.getItem("comment");

function saveComment() {
    var comment = document.getElementById("request_id").value;
    if (comment == "") {
        alert("Please enter a comment in first!");
        return false;
    }

    localStorage.setItem("comment", comment);
    alert("Your comment has been saved!");

    location.reload();
    return false;
}