我们在很多地方看到搜藏到新浪微博、腾讯微博、QQ书签、Google书签等分享推广功能,为了更方便的用这个功能,我将这个功能做成了一个js文件,大家只要在需要显示的地方插入这个js文件就可以了。这个文件主要包含了新浪微博、腾讯微博、QQ书签、Google书签、豆瓣、开心、人人、QQ空间、百度搜藏等几个分享网站。yahoo书签已经停止了这个项目,故没将yahoo书签包含在内。
以下为引用的内容:
// JavaScript Document
document.writeln("center我要分享到:a title=\"新浪微博分享\" href=\"javascript:(function(){window.open('http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank','width=450,);})()\"img border=\"0\" alt=\"新浪微博分享\" src=\"http://www.mingluxinxi.com/images/logo_sina_t.gif\" /新浪微博/a");
document.writeln("a href=\"javascript:void(0)\" _fcksavedurl="\"javascript:void(0)\"" onclick=\"postToWb();\" class=\"tmblog\"img src=\"http://www.mingluxinxi.com/images/weiboicon16.png\" border=\"0\"腾讯微博/a");
function postToWb(){var _t = encodeURI(document.title);var _url = encodeURI(document.location);var _appkey = encodeURI("appkey");//你从腾讯获得的appkey
var _pic = encodeURI('');//(列如:var _pic='图片url1|图片url2|图片url3....)
var _site = '';//你的网站地址
var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic;
window.open( _u,'转播到腾讯微博', 'top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );}
document.writeln("a href=\"javascript:window.open(\'http:\/\/www.kaixin001.com\/repaste\/share.php?rtitle=\'+encodeURIComponent(document.title.substring(0,76))+\'&rurl=\'+encodeURIComponent(location.href)+\'&rcontent=%=description%\',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\'); _fcksavedurl="\"javascript:window.open(\'http:\/\/www.kaixin001.com\/repaste\/奉节网站建设公司share.php?rtitle=\'+encodeURIComponent(document.title.substring(0,76))+\'&rurl=\'+encodeURIComponent(location.href)+\'&rcontent=%=description%\',\'_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=\"http://www.mingluxinxi.com/images/logo_kaixin.gif\" WIDTH=\"16\" HEIGHT=\"16\" BORDER=\"0\" ALT=\"转贴到开心网\"开心\/a");
document.writeln("A href=\"javascript:void((function(s,d,e){if(/xiaonei\.com/.test(d.location))return;var%20f='http://share.xiaonei.com/share/buttonshare.do?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){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%20a();})(screen,document,encodeURIComponent));\"IMG _fcksavedurl="\"javascript:void((function(s,d,e){if(/xiaonei\.com/.test(d.location))return;var%20f='http://share.xiaonei.com/share/buttonshare.do?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){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%20a();})(screen,document,encodeURIComponent));\"IMG" border=0 alt=\"分享到校内人人网\" src=\"http://www.mingluxinxi.com/images/renren_logo.gif\" height=16人人/A");
document.writeln("a href=\"javascript:void(0);\" _fcksavedurl="\"javascript:void(0);\"" onclick=\"window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;\" title=\"分享到QQ空间\"img src=\"http://www.mingluxinxi.com/images/qz_logo.png\" border=\"0\" alt=\"分享到QQ空间\" /QQ空间/a");
document.writeln("a href=\"javascript:u=location.href;t=document.title;t=t.substr(0,76);c=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);c=c.substr(0,180);var _fcksavedurl="\"javascript:u=location.href;t=document.title;t=t.substr(0,76);c=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);c=c.substr(0,180);var" 品牌网站建设 url=%22http://cang.baidu.com/do/add?it=%22+encodeURIComponent(t)+%22&iu=%22+encodeURIComponent(u)+%22&dc=%22+encodeURIComponent(c)+%22&fr=ien#nw=1%22;window.open(url,'_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');void 0\" title=\"添加到百度搜藏\"img width=\"16\" height=\"16\" border=\"0\" alt=\"百度搜藏\" src=\"http://www.mingluxinxi.com/images/baidu_cang.jpg\" /百度搜藏/a");
document.writeln("a href=\"javascript:(function(){var _fcksavedurl="\"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)})();\" title=\"收藏到Google书签\"img width=\"16\" height=\"16\" border=\"0\" alt=\"Google书签\" src=\"http://www.mingluxinxi.com/images/12496916883.jpg\" /Google书签/a");
document.writeln("a href=\"javascript:var _fcksavedurl="\"javascript:var" u='http://www.douban.com/recommend/?url='+location.href+'&title='+encodeURIComponent(document.title);window.open(u,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,);void(0)\" title=\"推荐给豆瓣友邻\"img src=\"http://www.mingluxinxi.com/images/duban_youlin.jpg\" alt=\"\" border=\"0\" /豆瓣/a");
document.writeln("a href=\"javascript:window.open('http://shuqian.qq.com/post?from=3&jumpback=2&noui=1&uri='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title),'','width=930,height=570,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)\"img _fcksavedurl="\"javascript:window.open('http://shuqian.qq.com/post?from=3&jumpback=2&noui=1&uri='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title),'','width=930,height=570,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)\"img" src=\"http://www.mingluxinxi.com/images/qq_shuqian.gif\" alt=\"\" border=\"0\" /QQ书签/a");
document.writeln("/center");
文章来源:mingluxinxi.com 转载请注明出处链接。
南京牧狼文化传媒有限公司简介:
牧狼传媒,牧者之心,狼者之性,以牧之谦卑宽容之心待人,以狼之团结无畏之性做事!
公司注册资金100万,主营众筹全案服务、网站营销全案服务、网站建设、微信小程序开发、电商网店设计、H5页面设计、腾讯社交广告投放以及电商营销推广全案等相关业务,致力于为客户提供更有价值的服务,创造让用户满意的效果!
为百度官方及其大客户、苏宁易购、金山WPS秀堂、美的、创维家电、新东方在线、伊莱克斯、宝丽莱等国内国外知名品牌服务过,服务经验丰富!同时,公司也是南京电子商务协会会员单位、猪八戒网官方认证签约服务商、江苏八戒服务网联盟、南京浦口文化产业联合会会员单位,可以为您提供更好的服务!
主营项目:众筹全案服务、网站营销全案服务、网站建设、微信小程序开发、电商网店设计、H5页面设计、腾讯社交广告投放、竞价托管、网站优化、电商代运营等
合作客户:百度、苏宁易购、饿了么、美的、创维家电、新东方在线、宝丽莱、金山WPS秀堂、伊莱克斯
资质荣誉:百度商业服务市场2017年度最佳图片服务商、南京电子商务协会会员单位、猪八戒网官方认证签约服务商、江苏八戒服务网联盟、南京浦口文化产业联合会会员单位、八戒通TOP服务商、"易拍即合杯"H5创意大赛"三等奖"。