使用jQuery从另一个HTML页面读取HTML/文本 [英] read html/text from another html page using jquery

查看:423
本文介绍了使用jQuery从另一个HTML页面读取HTML/文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用jquery从其他.html页面读取或提取html/text?

is it possible to read or extract html/text from a different .html page using jquery?

这就是我想阅读并在其他页面中显示的内容

this what i would like to read and display in a different page

                    <div class="newsItemContent"> 
                      <h1 class="title"> 
                        heading 1
                      </h1>
                      content 1 content 1 content 1 content 1 
                    </div>

                   <div class="newsItemContent"> 
                      <h1 class="title"> 
                        heading 2
                      </h1>
                      content 2 content 2 content 2 content 2 
                    </div>

谢谢

推荐答案

当然可以. $ .get()方法将执行您想要的操作.

Most certainly. The $.get() method will do what you want.

这篇关于使用jQuery从另一个HTML页面读取HTML/文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆