0
下面是位於iframe中的代碼。JQUERY +更新帶有變量的HTML代碼
我可以從父文檔獲取變量'url',並可以在警報中看到它。
我需要能夠更新fb:like-box中的'http://www.domainname.com'文本。
這樣做的最好方法是什麼?
THX
<script type="text/javascript">
$(function() {
var url = $('div#facebookURL', window.parent.document).text();
alert(url);
});
</script>
<div id="fb-root"></div>
<fb:like-box href="http://www.domainname.com" width="237" height="498" show_faces="true" stream="false" header="true"></fb:like-box>
完美...三江源! – Adam 2012-01-11 07:49:26