一键分享

来源:互联网 发布:入门摄影书籍推荐知乎 编辑:程序博客网 时间:2024/05/20 21:18
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
 </HEAD>

 <BODY>
  <a id="share2kaixin" href="#" target="_blank">kk<img src="images/p2_10.gif" width="16" height="28" alt="分享到开心网" /></a>
<a id="share2renren" href="#" target="_blank">rr<img src="images/p2_11.gif" width="16" height="28" alt="分享到人人网" /></a>
<a id="share2sina" href="#" target="_blank">sin<img src="images/p2_12.gif" width="16" height="28" alt="分享到新浪微博" /></a>
<a id="share2qq" href="#" target="_blank">qq<img src="images/p2_13.gif" width="16" height="28" alt="分享到腾讯微博" /></a>
 </BODY>
</HTML>
<script type="text/javascript">
    var p_url = encodeURIComponent(top.location.href);
    var p_title = encodeURIComponent(top.document.title);
    var p_pic = "";
    var share_kaixin = document.getElementById("share2kaixin");
    var share_renren = document.getElementById("share2renren");
    var share_sina = document.getElementById("share2sina");
    var share_qq = document.getElementById("share2qq");
    if(share_kaixin) share_kaixin.href = "http://www.kaixin001.com/repaste/share.php?rurl=" + p_url+"&rtitle="+p_title + "&rcontent=" + p_url;    
    if(share_renren) share_renren.href = "http://share.renren.com/share/buttonshare.do?link=" + p_url + "&title=" + p_title;
    if(share_sina) share_sina.href = "http://v.t.sina.com.cn/share/share.php?url="+ p_url+"&title="+p_title+"&source={source}&sourceUrl={sourceUrl}&content=utf8&pic="+p_pic;
    if(share_qq) share_qq.href = "http://v.t.qq.com/share/share.php?url="+p_url+"&title="+p_title+"&site={site}n&pic="+p_pic;    
</script>
0 0