-1
我想以类似Google Display的方式在我的网站上放置广告。我使用的是iframe来插入广告,但我遇到了它的大小问题。从广告iframe获取元数据
我不知道为什么iframe默认大小为300 x 150,无论源大小如何。
广告有一个元大小的元线。
<meta name="ad.size" content="width=300,height=250">
我想采取此信息并使用javascript更改iframe大小。我试过了:
$('#myiframe').load(function() {
var element = document.querySelector('meta[name="ad.size"]')['content'];
});
并且结果是空的。
请帮助。
B/R