一键分享到新浪微博、腾讯微博、搜狐微博、人人网、开心网、百度收藏等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 ...
随机推荐
- Repeater绑定数据库
前台: <table width="> <tr> <td class="tr1"> <asp:Label Text=" ...
- (转)Linux监控工具
需要监控Linux服务器系统性能吗?尝试下面这些系统内置或附件的工具吧. 大多数Linux发行版本都装备了大量的监控工具,这些工具提供了能用作取得相关信息和系统活动的量度指标. 你能使用这些工具发现造 ...
- [LeetCode 122] - 买入与卖出股票的最佳时机II(Best Time to Buy and Sell Stock II)
问题 假设你有一个数组,其中的第i个元素表示一只股票在第i天的价格. 设计一个算法找出最大的利润值.你可以进行任意多次的交易(即多次的卖出并买入一份股票).你不能在同一时间进行多次交易(即你必须在再次 ...
- JavsScript的基本特点
1.简单性Javascript是一种脚本语言,它采用小程序段的方式实现编程它同样也是一种解释性语言.2.动态性Javascript是动态的,它可以直接对用户或者客户输入做出相应,无须经过Web服务程序 ...
- VS2010编译Qt程序失败------error LNK1123: 转换到 COFF 期间失败:
error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏使用VS2010编译VC++项目的时候可能会出这个问题. 据说升级到SP1后可能问题解决,但是下载量太大,目前没有得到证实. ...
- 【转】精简深拷贝ArrayList实例
原文网址:http://gghhgame51333.blog.51cto.com/138362/289383 精简深拷贝ArrayList实例(包括递归和序列化方法) 2007-07-12 16:50 ...
- 免费 Bootstrap 管理后台模块下载
在这文章中我们将分享17+个最好的免费 Bootstrap 管理模板.你可以免费下载这些Twitter bootstrap 框架来开发网站后台. SB Admin 2 SB Admin is a fr ...
- 5 c语言数组
其中包括:冒泡 高精度加法 统计不相同的数字个数(数组) 数组元素倒序输出 go~~~~ #include <stdio.h> /* 功能:冒泡 时间:2016.11.15 */ void ...
- QT正则表达式---针对IP地址
判断合法IP的QT正则表达式: bool IsIPaddress(QString ip) { QRegExp rx2("(//d+)(//.)(//d+)(//.)(//d+)(//.)(/ ...
- asp.net cookie和session的详细使用
cookie使用代码: //设置Cookie HttpCookie setCookie = new HttpCookie("test"); setCookie.Values.Add ...