如何防止聊天应用程序中的混蛋 - vb.net

发布于 2024-08-21 19:26:24 字数 65 浏览 4 评论 0原文

我的聊天应用程序(尤其是 IE 中)中的文本出现抖动,因为我设置了每隔一秒刷新一次内容的计时器,如何防止这种情况发生

there is jerking in text in my chat application (particularly in IE) as i have set timer for refresh the content for each one second how to prevent this

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

弄潮 2024-08-28 19:26:24

如果使用ajax,而不是“替换”div中的内容,而是“附加”到它,

例如。使用jquery,而不是这样

$('#convo').html('<p>Msg1</p><p>Msg2</p><p>Msg3</p>');

$('#convo').append('<p>Msg1</p>');
$('#convo').append('<p>Msg2</p>');
$('#convo').append('<p>Msg3</p>');

if using ajax, rather than "replacing" the content in the div, "append" to it

eg. with jquery, rather than

$('#convo').html('<p>Msg1</p><p>Msg2</p><p>Msg3</p>');

do

$('#convo').append('<p>Msg1</p>');
$('#convo').append('<p>Msg2</p>');
$('#convo').append('<p>Msg3</p>');
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文