var url = window.location.href;
得到我的网址,现在我将把网址变量放在Facebook共享链接中。
<fb:share-button href="url variable here" type="button"></fb:share-button>
我该如何实现?
希望有人能帮助我。
你去吧!
var url = window.location.href;
$('fb\:share-button').attr('href', url)
希望这有帮助