supman
V2EX  ›  问与答

同时使用 ajax 和 setInterval 后 每次刷新页面都要跳一下

  •  
  •   supman · Jan 29, 2016 · 2048 views
    This topic created in 3794 days ago, the information mentioned may be changed or developed.


    求助: 代码基本都是从 w3cschool 复制的, 自己拼拼凑凑勉强能用, 但是今天突然发现个严重问题, 如果使用 setInterval 页面跳的很严重, 都影响使用了。
    2 replies    2016-01-29 08:15:47 +08:00
    supman
        1
    supman  
    OP
       Jan 29, 2016
    哈哈 刚才用 div 设置了个固定高度的属性, 现在不会跳了, 但是因为刷新时间过短, 还是会有很明显的闪烁。。
    loading
        2
    loading  
       Jan 29, 2016 via Android
    来晚了,下次务必把 html 贴全。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   938 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 23:03 · PVG 07:03 · LAX 16:03 · JFK 19:03
    ♥ Do have faith in what you're doing.