从外部网页加载特定的div [英] load specific div from external webpage

查看:89
本文介绍了从外部网页加载特定的div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直想做一些高级的事情:在一个特定的网页上打开多个用户帐户,以便同时进行多个约会,所以我只想加载或刷新约会div日历,而不刷新整个网站.再说一次,这不是我的网站,只是外部的约会页面

I was looking to do something advanced: open multiple user accounts on a specific webpage, to make multiple appointments at the same time so I want to only load or refresh, the appointment div calendar, without refresh whole website. Again it is not my website, just external webpage for appointment

推荐答案

您可以使用iFrame在另一个网站上引用div.iFrame用于引用该人的日历所在的其他网站上的div.您可能需要添加更多信息/代码示例,以便我们可以更轻松地帮助您.

You can reference a div on another website using an iFrame. The iFrame is used to reference the div on the other website where the calendar of that person is located. You might want to add more information / code examples so that we can help you easier.

$('#yourPage').load('wwww.webSiteWithElementYouWant.com #calendarDivIdName');

这是从Pointy在此页面.

This is a solution with inspiration from Pointy's answer on this page.

编辑1 应该能够使用以下方法定位:

Edit 1 You should be able to target a class by using:

$('#yourPage').load('wwww.webSiteWithElementYouWant.com .calendarDivClassName');

这篇关于从外部网页加载特定的div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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