js分享到facebook,twitter,linkedin和google
2015-07-19 00:00
701 查看
直接上代码
<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>
版权声明:本文为博主原创文章,未经博主允许不得转载。
<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>
版权声明:本文为博主原创文章,未经博主允许不得转载。
相关文章推荐
- js颜色选择器的两种实现直接上代码(代码里有一种,附件里是另一种)
- js颜色选择器的两种实现直接上代码(代码里有一种,附件里是另一种)
- js取得url的参数,并把参数赋值
- js取得url的参数,并把参数赋值
- ExtJS5——form提交表单
- [LeetCode][JavaScript]Wildcard Matching
- 《JavaScript设计模式与开发实践》读书笔记之模板方法模式
- [BZOJ1012][JSOI2008]最大数maxnumber
- json 总结
- js笔记
- 网页性能之HTML,CSS,JavaScript
- JavaScript学习要点(二)
- JavaScript匿名函数与闭包
- [LeetCode][JavaScript]Sliding Window Maximum
- Javascript下IE与Firefox下的差异兼容写法总结
- VS 2013 配置jsoncpp 库(亲测可行)
- JavaScript中逗号运算符和this
- JavaScript---DOM文档
- JS中怎么将json对象转化成字符串
- 【JavaScript】——JS入门