首页 > 代码库 > JS 实现新浪微博, QQZone 等的分享
JS 实现新浪微博, QQZone 等的分享
<script type="text/javascript">window.pageConfig = { compatible: true,searchType: 1 }; </script> <script type="text/javascript"> var t_url = "http://192.168.1.105:8080/MyHBook/"; function convertURL(url) { return t_url + url; } function convertPicUrl(picurl) { return t_url + picurl; } //分享到新新浪微博 function shareWeiBo(title,url,picurl){ //alert(">>>"); //alert(title + " : " + url + " : " + picurl); url = convertURL(url); picurl = convertPicUrl(picurl); //alert(url + " : " + picurl); 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=400,width=400,top=100,left=100‘); } //分享到腾讯微博 function shareTCWeiBo(title,url,picurl){ //alert(">>>"); //alert(title + " : " + url + " : " + picurl); url = convertURL(url); picurl = convertPicUrl(picurl); var shareqqstring=‘http://v.t.qq.com/share/share.php?title=‘+title+‘&url=‘+url+‘&pic=‘+picurl; window.open(shareqqstring,‘newwindow‘,‘height=400,width=400,top=100,left=100‘); } //分享到QQ空间 function shareQZone(title,url,picurl) { url = convertURL(url); picurl = convertPicUrl(picurl); //alert(url + " : " + picurl); var shareqqzonestring=‘http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?summary=‘+title+‘&url=‘+url+‘&pics=‘+picurl; window.open(shareqqzonestring,‘newwindow‘,‘height=400,width=400,top=100,left=100‘); } </script>
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。