簡體   English   中英

提交后從字段中刪除文本

[英]remove text from field after submit

我有一個帶有發送按鈕的數字框

<input id="inputbox" type="number">
<button id="button" type="button" onclick="sendBid()"> Send </button>

點擊按鈕后發送信息

<script>
function sendBid() {
        liveSend(parseInt(inputbox.value));
    }
</script>

該數字應從輸入框的顯示中刪除。 我怎樣才能做到這一點?

<script>
function sendBid() {
        liveSend(parseInt(inputbox.value));
        inputbox.value = ""; // This line
    }
</script>

暫無
暫無

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

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