gpt4 book ai didi

javascript - StackOverflow 如何知道问题何时有新答案?

转载 作者:可可西里 更新时间:2023-11-01 02:21:18 25 4
gpt4 key购买 nike

如果这个问题已经被问过,我很抱歉,请指出正确的方向。

我想知道是否有人了解 StackOverflow 如何在您添加帖子时在问题顶部弹出“已发布 n 个新答案,加载新答案”的内容。这对我的论坛网站来说似乎是一个非常有用的功能,我想知道它是如何完成的。我假设有一些 ajax 或某种高级 javascript。

最佳答案

看看这篇 SO 博文:https://blog.stackoverflow.com/2008/10/solving-the-fastest-gun-in-the-west-problem/

That said, the one implementablerecommendation that came out of thisdiscussion is an active, GMail likenotification when you are composing ananswer. We agreed with this featurerequest, so Jarrod implemented it.Here’s how it works:

  1. When you start composing a reply, a timer is created.
  2. Every minute, the page checks itself to see if new answers havearrived.
  3. If new answers arrive, the notification bar will tell you howmany, and offer to update the page foryou.
  4. Answer updates are performed AJAX style, so they don’t interruptyour current answer.

关于javascript - StackOverflow 如何知道问题何时有新答案?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/250473/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com