使用 javascript / ajax 设置延迟
当结果
出现在注释
中时,我想延迟
。
我有一个表单< /代码> >
input
用户在 input
中输入他的用户名,然后我使用 AJAX
检查
用户名
是否可用。如果是,则注释
会显示在输入
附近以及
结果
。
请不要使用 jQuery!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要使用
setTimeout()
来短暂延迟后显示一些内容:You may want to use
setTimeout()
to display something after a short delay: