V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yantianqi
V2EX  ›  jQuery

jq ajax 返回的数据怎么获取其中一部分?

  •  
  •   yantianqi · 2016-12-05 11:00:37 +08:00 · 3716 次点击
    这是一个创建于 2670 天前的主题,其中的信息可能已经有所发展或是发生改变。

    例如 data 返回数据为一整个网页 如何只获取 body 内容?

    <html>
      <head>
      <title>title</title>
      </head>
      <body>
        如何只获取 body 中的内容
      </body>
    </html>
    
    1 条回复    2016-12-05 11:15:30 +08:00
    hiro0729
        1
    hiro0729  
       2016-12-05 11:15:30 +08:00
    $(data).find('body')
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2912 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:17 · PVG 23:17 · LAX 08:17 · JFK 11:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.