FB分享到新视窗 [英] FB share in new window

查看:87
本文介绍了FB分享到新视窗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用以下代码来共享FB:

I've got FB share working with the following code:

<a target="_blank" href="http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%3A%2F%2Fferalmotion.com%2Fshare%3Fwatch%3Dfd5f0c2"> 
<img src="/images/logo/facebook.png" alt="share on facebook"/> 
</a>

问题在于它会在完整的浏览器窗口中打开.有人知道我将如何在标准的500 x 360弹出窗口中打开共享吗?

The problem is it opens in a full browser window. Does anybody know how I would get the share to open in the standard 500 x 360 pop-up window ???

推荐答案

javascript将完成这项工作.

javascript will do the job.

<script type="text/javascript">
<!--
function myPopup(url) {
window.open( url, "myWindow", "status = 1, height = 500, width = 360, resizable = 0" )
}
//-->
</script>

<a target="_blank" href="javascript:myPopup('http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%3A%2F%2Fferalmotion.com%2Fshare%3Fwatch%3Dfd5f0c2')"> 
<img src="/images/logo/facebook.png" alt="share on facebook"/> 
</a>

这篇关于FB分享到新视窗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆