一键分享到新浪微博、腾讯微博、搜狐微博、人人网、开心网、百度收藏等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 ...
随机推荐
- jquery正则表达式显示文本框输入范围 只能输入数字、小数、汉字、英文字母的方法
正则表达式限制文本框只能输入数字 许多时候我们在制作表单时需要限制文本框输入内容的类型,下面我们用正则表达式限制文本框只能输入数字.小数点.英文字母.汉字等各类代码.1.文本框只能输入数字代码(小数点 ...
- 装饰者模式 - OK
装饰模式(Decorator),动态地给一个对象添加一些额外的职责,就增加功能来说,装饰模式比生成子类更为灵活. 装饰者模式隐含的是通过一条条装饰链去实现具体对象,每一条装饰链都始于一个Compon ...
- VC6.0 编译 gdlib 库
环境 WinXP, MSVC6.0 1 从 https://bitbucket.org/libgd/gd-libgd/downloads 下载最新版本 libgd 2 可以用 nmake 编译 w ...
- requirejs-define jquery 快速初学实例(一)
原文地址:http://6yang.net/articles_view.php?id=1103 2011-10-18 13:12:01 by [6yang], 1029 visits, 收藏 | 返回 ...
- Ubuntu/Linux 笔记应用 为知笔记(支持markdown)
发现网易云笔记没有Linux,但是为知笔记有Linux版本,且支持markdown格式 sudo add-apt-repository ppa:wiznote-team sudo apt-get up ...
- log4net 快速上手使用
*本随笔仅限快速上手,如需深入探究,可查阅其它博友. 一.下载log4net.dll并添加引用; 二.添加配置文件 log4net.xml : <?xml version="1.0&q ...
- python高级编程之我不测试
# -*- coding: utf-8 -*-__author__ = 'Administrator'#测试驱动开发(高级编程处学习,第11章)#测试驱动开发也叫TDD, 是制造高质量软件的一种简单技 ...
- ASP.NET简单文件上传
一>使用FileUpload控件,将其拖入页面: <%@ Page Title="hehe" Language="C#" MasterPageFil ...
- [RxJS] Reactive Programming - Rendering on the DOM with RxJS
<!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery- ...
- [ES6] Generators
Example 1: function *topicList(){ yield "ES2015"; yield "Semi-colons: good or bad?&qu ...