您的位置:首页 > Web前端 > JavaScript

js分享到facebook,twitter,linkedin和google

2015-07-19 00:00 591 查看
直接上代码

<li><a target="_blank" onclick="javascript:window.open('http://www.facebook.com/sharer.phpu='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title), 'newWindow', 'width=800, height=400','center');void(0);" class="f"></a></li>
<li><a href="javascript: void(window.open('http://twitter.com/home/?status='.concat(encodeURIComponent(document.title)) .concat(' ') .concat(encodeURIComponent(location.href))));" class="t"></a></li>
<li><a target="_blank" href="javascript: void(window.open('http://www.linkedin.com/shareArticle?mini=true&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)))" class="i"></a></li>
<li><a target="_blank" href="javascript: void(window.open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)))" class="g"></a></li>

版权声明:本文为博主原创文章,未经博主允许不得转载。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: