一键分享到新浪微博、腾讯微博、搜狐微博、人人网、开心网、百度收藏等js代码大全
下面给大家一些分享的js代码,只要把代码插入自己的网页中稍微修改一下图片路径就可以用了,好了,废话少说,上代码:
document.writeln("<b>喜欢本文,那就分享到:</b>
");
document.write(" <a href=\"javascript:window.open(\'http:\/\/v.t.sina.com.cn\/share\/share.php?title=\'+encodeURIComponent(document.title.substring(0,76))+\'&url=\'+encodeURIComponent(location.href)+\'&rcontent=\',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\'); void 0\" style=\"color:#000000;text-decoration:none;font-size:12px;font-weight:normal\"><img src='/images/share/sina.jpg' alt='新浪微博' title='分享到新浪微博' border='0'></a> ");
document.write(" <a href=\"javascript:(function(){window.open('http://v.t.qq.com/share /share.php?title='+encodeURIComponent(document.title)+'& url='+encodeURIComponent(location.href)+'& source=bookmark','_blank','width=610,height=350');})()\" title=\"分享到QQ微博\"><img src='/images/share/qqwb.png' border='0' alt='腾讯微博' title='分享到腾讯微博'/></a>");
document.write(" <a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('http://t.sohu.com/third/post.jsp?&url='+escape(d.location.href)+'&title='+escape(d.title)+'&rcontent='+escape(d.title),'kaixin'));kaixin.focus();\"><img src='/images/share/sohu.jpg' title='分享到搜狐微博' alt='搜狐微博' border='0' height='16' width='16'></a>");
document.writeln(" <a href=\"javascript:u=location.href;t=document.title;c = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);var url="http:\/\/cang.baidu.com\/do\/add?it="+encodeURIComponent(t)+"&iu="+encodeURIComponent(u)+"&dc="+encodeURIComponent(c)+"&fr=ien#nw=1";window.open(url,"_blank","scrollbars=no,width=440,height=440,left=80,top=80,status=no,resizable=yes"); void 0\"><img src='/images/share/baidu.gif' title=\'分享到百度搜藏\' alt='百度收藏' border=\'0\'><\/a> ");
document.write(" <a href=\"javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+c(b.location)+'&title='+c(b.title),'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();\"><img src='/images/share/google.png' alt='Google书签' border='0' title='分享到谷歌书签' ></a> ");
document.write(" <a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('http://www.kaixin001.com/~repaste/repaste.php?&rurl='+escape(d.location.href)+'&rtitle='+escape(d.title)+'&rcontent='+escape(d.title),'kaixin'));kaixin.focus();\"><img src='/images/share/kaixin.ico' title='分享到开心网' alt='开心网' border='0' height='16' width='16'></a>");
document.write(" <a href=\"javascript:void((function(s,d,e){if(/xiaonei\.com/.test(d.location))return;var f='http://share.xiaonei.com/share/buttonshare.do?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();})(screen,document,encodeURIComponent));\"><img src='/images/share/renren.ico' alt='人人网' title='分享到人人网' border='0' height='16' width='16'></a>");
document.write(" <a href=\"javascript:q=(document.location.href);void(open('http://www.douban.com/recommend/?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));\"><img src='/images/share/douban.jpg' border='0' alt='豆瓣网' title='分享到豆瓣网'/></a> ");
document.write(" <a href=\"javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));\"><img src='/images/share/hexun.gif' title='分享到和讯网摘' border='0'></a> ");
document.write(" <a href=javascript:window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','');void(0)><img src=\"/images/share/qq.gif\" alt='QQ书签' border='0'></a> ");
document.write(" <a href=\"javascript:location.href='http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=440,height=440,left=80,top=80,status=yes,resizable=yes';\" target='_blank'><img src='/images/share/yahoo.gif' alt='雅虎收藏' title='分享到雅虎收藏' border='0' ></a> ");
document.write(" <a href=\"javascript:location.href='http://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\" target='_blank'><img src=\"/images/share/live.gif\" alt=\"Live Bookmark\" title=\"分享到Live Bookmark\" border=\"0\"/></a>");
document.write(" <a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=28&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();\"><img src='/images/share/vivi.gif' title='分享到新浪ViVi' border='0'></a> ");
document.write(" <a href=\"javascript:q=(document.location.href);void(open('http://www.digbuzz.com/submit.php?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));\"><img src='/images/share/digbuzz.gif' border='0' alt='Digbuzz我挖网' title='分享到Digbuzz我挖网'/></a> ");
一键分享到新浪微博、腾讯微博、搜狐微博、人人网、开心网、百度收藏等js代码大全的更多相关文章
- 接入新浪、腾讯微博和人人网的Android客户端实例 接入新浪、腾讯微博和人人网的Android客户端实例
做了个Android项目,需要接入新浪微博,实现时也顺带着研究了下腾讯微博和人人网的Android客户端接入,本文就跟大家分享下三者的Android客户端接入方法. 一.实例概述 说白了,接入微博就是 ...
- 一键分享QQ、微信、微博等
github上找到的,合并了一个二维码在线支持API,直接修改样式可用. 二维码API说明网址:http://www.liantu.com/pingtai/ <html> <head ...
- 分享到QQ空间、新浪微博、腾讯微博和人人网
function shareys(type, url, title, img, content) { switch (type) { case "sina": url = &quo ...
- 批量删除微博的js代码
清空微博,网上找了一段js代码,试了下,还行. var fileref=document.createElement('script') fileref.setAttribute("type ...
- web端分享网页到各个网站JS代码(微信为生成二维码)
/*分享到新浪微博,QQ空间,人人网,生成二维码*/ var myTitle=$("title").text(); var myHref = window.location.hre ...
- 新浪微博、腾讯微博、QQ空间、人人网、豆瓣 一键分享API
新浪微博: http://service.weibo.com/share/share.php?url= count=表示是否显示当前页面被分享数量(1显示)(可选,允许为空) & url=将页 ...
- [转]QQ空间、新浪微博、腾讯微博等一键分享API链接代码
转自------ 1.新浪微博:http://service.weibo.com/share/share.php?url= count=表示是否显示当前页面被分享数量(1显示)(可选,允许为空)&am ...
- QQ空间、新浪微博、腾讯微博等一键分享API链接代码
1.新浪微博:http://service.weibo.com/share/share.php?url= count=表示是否显示当前页面被分享数量(1显示)(可选,允许为空)&url=将页面 ...
- 分享到QQ空间、新浪微博、腾讯微博的代码
今天公司原来的分享代码,在IE下有问题.网上找了下网上的分享代码. 给网页加上分享代码,借助网友的力量推广网站,目前已经很流行了 以下是网页代码 QQ空间分享代码如下: <a href=&quo ...
随机推荐
- C语言初学 if-else语句判别在ASCII值中小于32的可控制符的类型
#include<stdio.h> main() { char c; printf("输入一个符号\n"); c=getchar(); if(c<32) prin ...
- jQuery的Autocomplete插件的远程url取json数据的问题
关于远程返回的json数据的展示,以前一样的代码,如果是本地写好的json串数据,插件显示就没有问题,一旦换成ulr方式读取一样的数据,插件就不能正常显示问题了. 今天偶然搜索资料找到一篇csdn上有 ...
- Cassandra笔记--2. 安装
1. 从apache官网下载Cassandra,我用的版本是2.1.8.压缩包解压,这里的目录是D:\cassandra\apache-cassandra-2.1.8 2. 配置环境变量 添加环境变 ...
- ThrottleStop
ThrottleStop 我的要开这个软件,睿频才能开.不然一直工作在1.8Ghz下默认频率太低了开了这个速度才有提升
- python 执行shell命令
1.os模块中的os.system()这个函数来执行shell命令 1 2 3 >>> os.system('ls') anaconda-ks.cfg install.log i ...
- linux下 tags相关
在vim中配置好了YouCompleteMe插件,发现把光标移动到函数名下再按ctrl+],并不能跳转到该函数的定义处.解决办法: 1.先查看有没有安装ctags,运行ctags –version查看 ...
- debug openStack
ERROR neutron.agent.l3.agent [-] An interface driver must be specified No valid host was found. Ther ...
- vagrant拷贝后vagrant file需要加的配置
config.ssh.forward_agent config.ssh.username = "vagrant" config.ssh.password = "vagra ...
- hadoop2对比hadoop1
hadoop2对比hadoop1 1.体系结构 HDFS+MapReduce,共同点都是分布式的,主从关系结构. HDFS=一个NameNode+多个DataNode, NameNode含有我们用户存 ...
- JavaScript 判断一个字符串是否在另一个字符串中
传统上,JavaScript只有indexOf方法,可以用来确定一个字符串是否包含在另一个字符串中.ES6又提供了三种新方法. includes():返回布尔值,表示是否找到了参数字符串. start ...