English 中文(简体)
因此,(窗口[iframeName].document. . . .html()在一变动时做工。
原标题:why $(window[ iframeName ].document.body).html() doesn t work when i change .attr( src )

为什么

$(window[ iframeName ].document.body).html()

...work when i change .attr ( src

当一把iframe的电弧特性定在一页时,该代码

$(window[ iframeName ].document.body).html() 

......将工作。

但是,如果将斜体改为.attr(弧,”www.google.com.sa”,并等待装上该页,

$(window[ iframeName ].document.body).html() 

......不工作。

问题在哪里?

最佳回答

当你在单体内从一个不同领域装上一页时,你可以浏览。 这是出于安全原因。

问题回答

审判:

.attr( src ,"http://www.google.com.sa")

几个方面:

首先, setting(弧)将产生一个新的历史项目。 你们应当考虑一下,你是否真的想要这样做,例如,如果有人可以点击背纽,进入最后一页。 如果你不希望改变历史状态(如果影响而不是直截了当),那么你就希望改变文件的位置。

第二,我发现,与这样的网页互动非常容易:

$("#frameID").contents().find("jquery selector");

您可以通过电话获得全方位的超文本:

$("#frameID").contents(document).children().html()




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签