-1
我试过多个脚本和方法清除输入字段,一旦输入命中。我有一个脚本工作,虽然它太快,所以邮件永远不会提交。 我想知道是否有什么办法可以延缓它?HTML输入在输入不清除字段
这是我使用的脚本,虽然它提交太快当你点击提交按钮
\t \t <input class="chat-window-message keydown" name="message" id="InputMessage" type="text" autocomplete="off" placeholder="....." onload="self.focus();" autofocus required />
\t \t \t <script>
document.getElementById('InputMessage').addEventListener('change',function(){
//somehow search for the term here
//remove text
document.getElementById('InputMessage').value='';
},false); \t
</script>
你究竟想要什么?你可以说得更详细点吗 ? –
我需要延迟一秒的功能,以便表单有机会提交 –
您可以使用'setTimeout'函数延迟您想要的任何js代码 –