• 请不要在回答技术问题时复制粘贴 AI 生成的内容
lm902
V2EX  ›  程序员

在不刷新页面的情况下加载另一页,是怎么做到的

  •  
  •   lm902 ·
    lm902 · Jun 28, 2014 · 3515 views
    This topic created in 4357 days ago, the information mentioned may be changed or developed.
    例如 使用IE10以上版本打开 https://www.youtube.com ,点击一个视频,它将不会刷新页面,而是在首页显示一个红色的加载条,然后进入视频,并且网址会变更
    使用IE10以上版本打开 https://play.google.com ,点击一个链接,会显示一个载入图标,然后进入项目
    页面完全不会变为空白
    wwqgtxx
        1
    wwqgtxx  
       Jun 28, 2014 via Android
    ajax
    ejin
        4
    ejin  
       Jun 28, 2014
    PJAX,说白了就是AJAX,然后修改地址栏的网址。(新版浏览器都支持了)

    最早是在qq邮箱发现使用了这个
    oott123
        5
    oott123  
       Jun 28, 2014 via Android
    ajax 结合 history.push ,也就是楼上所说的 pjax
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5100 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 09:42 · PVG 17:42 · LAX 02:42 · JFK 05:42
    ♥ Do have faith in what you're doing.