java 博客分享实现--facebook--linkein
2015-04-08 15:32
253 查看
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>
<p id="p1">点击下面的按钮可以将这段文字和图片分享到新浪微博哦!@飞鱼</p>
<img src='http://xinji1101.sinaapp.com/b.jpg'/>
<input type="button" class="btn" id="btn" value='share'>
</div>
</body>
<script src='jquery-1.9.1.js'></script>
<script>
$('#btn').click(function(){
window.sharetitle = $(this).siblings('#p1').html();
window.shareUrl = $(this).siblings('img').attr('src');
share();
});
function share(){
//d指的是window
(function(s,d,e){try{}catch(e){}var f='http://v.t.sina.com.cn/share/share.php?',u=d.location.href,p=['url=',e(u),'&title=',e(window.sharetitle),'&appkey=2924220432','&pic=',e(window.shareUrl)].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width-620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})(screen,document,encodeURIComponent);
}
function test(){
var abc = [1,3,5].join('');
alert(abc);
}
test();
</script>
</html>
2
<a class="fb_t" href="javascript: void(window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(location.href)) ))"title="share to Facebook" rel="nofollow">Facebook</a></div>
3
<a href='https://www.linkedin.com/shareArticle?mini=true&title=baidushare&url=http://www.baidu.com&summary=undefined&source=ProgrammableWe3b'>linked in 2</a>
4 facebook
4 wtitter
<a href="http://twitter.com/intent/tweet?url=http://www.baidu.com&text=hello world">twitter2</a>
5
<a target="_blank" title="Share on Twitter" class="social-share-links__link social-share-links__link--twitter" href="https://twitter.com/intent/tweet?text=Make%20a%20Neon%20Vector%20Shooter%20in%20jMonkeyEngine%3A%20The%20Basics&url=http%3A%2F%2Fgamedevelopment.tutsplus.com%2Ftutorials%2Fmake-a-neon-vector-shooter-in-jmonkeyengine-the-basics--gamedev-11616&via=tutsplus"
sl-processed="1"><i class="fa fa-twitter social-share-links__icon"></i><div class="social-share-links__count">4</div></a>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>
<p id="p1">点击下面的按钮可以将这段文字和图片分享到新浪微博哦!@飞鱼</p>
<img src='http://xinji1101.sinaapp.com/b.jpg'/>
<input type="button" class="btn" id="btn" value='share'>
</div>
</body>
<script src='jquery-1.9.1.js'></script>
<script>
$('#btn').click(function(){
window.sharetitle = $(this).siblings('#p1').html();
window.shareUrl = $(this).siblings('img').attr('src');
share();
});
function share(){
//d指的是window
(function(s,d,e){try{}catch(e){}var f='http://v.t.sina.com.cn/share/share.php?',u=d.location.href,p=['url=',e(u),'&title=',e(window.sharetitle),'&appkey=2924220432','&pic=',e(window.shareUrl)].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width-620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})(screen,document,encodeURIComponent);
}
function test(){
var abc = [1,3,5].join('');
alert(abc);
}
test();
</script>
</html>
2
<a class="fb_t" href="javascript: void(window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(location.href)) ))"title="share to Facebook" rel="nofollow">Facebook</a></div>
3
<a href='https://www.linkedin.com/shareArticle?mini=true&title=baidushare&url=http://www.baidu.com&summary=undefined&source=ProgrammableWe3b'>linked in 2</a>
4 facebook
4 wtitter
<a href="http://twitter.com/intent/tweet?url=http://www.baidu.com&text=hello world">twitter2</a>
5
<a target="_blank" title="Share on Twitter" class="social-share-links__link social-share-links__link--twitter" href="https://twitter.com/intent/tweet?text=Make%20a%20Neon%20Vector%20Shooter%20in%20jMonkeyEngine%3A%20The%20Basics&url=http%3A%2F%2Fgamedevelopment.tutsplus.com%2Ftutorials%2Fmake-a-neon-vector-shooter-in-jmonkeyengine-the-basics--gamedev-11616&via=tutsplus"
sl-processed="1"><i class="fa fa-twitter social-share-links__icon"></i><div class="social-share-links__count">4</div></a>
相关文章推荐
- Facebook优化分享后记 - 放翁(文初)的一亩三分地 - CSDN博客
- 终于实现通过java发送Internet邮件了!!!分享一下
- Java实现局域网聊天软件分享
- 分享矩阵乘法单线程与多线程的Java实现与效率对比,请教Strassen算法
- 【java实现邮件的发送分享】
- 最近在学Java,想想后面会遇到很多问题,写个博客分享一下
- 通过代理类实现java连接数据库(使用dao层操作数据)实例分享
- android点击实现图片放大缩小 - java技术博客
- java实现多线程断点续传,上传下载 分享
- [分享]Java 线程池的原理与实现
- 关于用Java实现博客文章的摘要显示
- 分享制作精良的知识管理系统 配置SQL Server文档数据库 完美实现博客文章的的下载,存储和浏览
- iphone 里使用sharekit实现分享信息到facebook、twitter
- 组件实现【技术分享】发布本人所属 Java 与 C++ 开源项目
- social.framework 实现分享文字图片等到新浪微博,twitter,facebook,保存和打印。
- Java技巧:java实现文件监控技巧分享
- Android中观察者模式的实现--第二届 Google 暑期大学生博客分享大赛 - 2011 Android 成长篇
- [分享]Java 线程池的原理与实现
- Java实现局域网聊天软件分享
- 单词博弈Java实现(借鉴“miss若尘”博客中写的解题思路)