你的位置:首页 > 软件开发 > Java > javascript社交平台分享

javascript社交平台分享

发布时间:2016-03-27 00:00:31
整理的五个社交平台的分享<!doctype html><html lang="en"><head> <meta charset="UTF-8"> <title>Document ...

整理的五个社交平台的分享

<!doctype html><html lang="en"><head>  <meta charset="UTF-8">  <title>Document</title></head><body>  <h2>分享</h2>  <div id="sina">新浪微博</div>  <div id="qqweibo">qq微博</div>  <div id="qqConnect">qq好友</div>  <div id="qqZone">qq空间</div>  <div id="renren">人人网</div></body><script type="text/javascript">  var sina = document.getElementById("sina");  var qqweibo = document.getElementById("qqweibo");  var qqConnect = document.getElementById("qqConnect");  var qqZone = document.getElementById("qqZone");  var renren = document.getElementById("renren");  var url = "http://docs.angularjs.cn/api";  var title = "angular.js";  var content = "...shared content...";  var picurl = "http://imga1.pic21.com/bizhi/140226/07916/s04.jpg";  sina.onclick = function(){    var sharesinastring='http://v.t.sina.com.cn/share/share.php?title='+title+'&url='+url+'&content=utf-8&sourceUrl='+url+'&pic='+picurl;    window.open(sharesinastring,'newwindow','height=100,width=100,top=100,left=100');  }  qqweibo.onclick = function(){    var shareqqstring='http://v.t.qq.com/share/share.php?title='+content+'&url='+url+'&pic='+picurl;      window.open(shareqqstring,'newwindow','height=100,width=100,top=100,left=100');   }  qqConnect.onclick = function(){    var shareqqConnect = 'http://connect.qq.com/widget/shareqq/index.html?url=' + url + '&title=' + title + '&description=' + '' + '&charset=utf-8'    window.open(shareqqConnect,'newwindow','height=100,width=100,top=100,left=100');  }  qqZone.onclick = function(){    var shareqqzonestring='http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?site=www.tuan2.com&title=' + '' + '&desc=' + title + '&summary=' + '分享分享' + '&url=' + url + 'pic' + picurl;      window.open(shareqqzonestring,'newwindow','height=400,width=400,top=100,left=100');  }  renren.onclick = function(){    var sharerenrenstring='http://widget.renren.com/dialog/share?resourceUrl=' + url +'&title=' + title + '&description=' + '' + '&charset=utf-8';      window.open(sharerenrenstring,'newwindow','height=400,width=400,top=100,left=100');      }</script></html>

原标题:javascript社交平台分享

关键词:JavaScript

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。