分享到QQ空间、新浪微博、腾讯微博和人人网
function shareys(type, url, title, img, content)
{
switch (type) {
case "sina":
url = "http://service.weibo.com/share/share.php?title=" + encodeURIComponent(content + '「' + title + '」' + ' 点这里' + url) + '&pic=' + img;
window.open(url);
break;
case "tqq":
url = "http://v.t.qq.com/share/share.php?url=" + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&pic=' + img;
window.open(url);
break;
case "qzone":
url = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(url + '#-39yst-1-001') + '&title=' + encodeURIComponent(title) + '&site=&pics=' + encodeURIComponent(img) + '&desc=' + encodeURIComponent(content) +'&summary=' + encodeURIComponent(content);
window.open(url);
break;
case "ren":
url = 'http://widget.renren.com/dialog/share?resourceUrl=' + encodeURIComponent(url) + '&srcUrl=' + img + '&title=' + encodeURIComponent(title);
+'&description=' + content;
window.open(url);
break;
default:
break;
}
}
<script type="text/javascript">
function postsShare(pType)
{
var pTitle = "{:$seo_title:}";
var pImage = "";
var pContent = "{:$seo_desc:}";
var pUrl = window.location.href;
shareys(pType, pUrl, pTitle, "", pContent);
}
</script>
最新文章
- [转]hql 语法与详细解释
- oracle实现split函数功能
- Vue.js – 基于 MVVM 实现交互式的 Web 界面
- 让所有的浏览器都支持html5
- oracle创建用户、表空间、授权
- 12.162s 1805.867s
- Optimizing shaper — hashing filters (HTB)
- 华为OJ平台——字符串通配符
- Asp.net Json 解析 与 直接用ip访问返回josn
- Tesla为什么要公开专利
- SourceTree + Bitbucket - 轻松云端作业
- poj3617Best Cow Line
- [Android]Android焦点流程代码分析
- JDK动态代理[1]----代理模式实现方式的概要介绍
- 如何处理导出的csv无法查看身份证后三位的情况?
- 10. Firewalls (防火墙 2个)
- PAT甲级题解-1047. Student List for Course (25)-排序
- delphi制作登陆窗体
- 规避javascript多人开发函数重名问题
- 解决servlet-api包冲突问题(maven)