2013-04-10 58 views
0

我正在使用prettyphoto在iframe中顯示網頁。是否有人知道包含網頁http://引用的唯一值的元素ID?由於他們沒有身份證,我以爲我可以使用它。prettyphoto iframe

謝謝。

我正在某處。

alert($(「#pp_full_res」)。html());

給我

IFRAME SRC = 「http://xxxx.com/zzz/html」 iframeborder = 「無」 HEIGHT = 「640」 等等等等

怎麼可以只抓住src?

感謝

回答

0

建立在你上面的例子,爲了讓你可以使用jQuery的ATTR()方法的實際IFRAME SRC。

var sSrc = $(「#pp_full_res」)。attr('src');

0

iniatializating prettyPhoto時,您可以設置自己的iframe參考:

$("a[rel^='prettyPhoto']").prettyPhoto({ 
    iframe_markup: '<iframe id="name-here" name="name-here" src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>', 
});