网站建设—自定义a标签创建自定义分享—代码分享如何去做自定义a标签创建自定义分享及代码分享,在做这些代码的时候,我们应该注意些很么?请看下图及下面代码介绍。vartemplates={qzone:'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}',qq:'http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary="{{SUMMARY}}"',weibo:'https://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}',wechat:'javascript:',douban:'http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11',linkedin:'http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin',facebook:'https://www.facebook.com/sharer/sharer.php?u={{URL}}',twitter:'https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{ORIGIN}}',google:'https://plus.google.com/share?url={{URL}}'};将上述的路径放到a标签的href既可,注意替换路径中的{URL}等参数即可使用。URL是分享地址TITLE是分享的标题DESCRIPTION描述IMAGE图片SOURCE来源SUMMARY描述ORIGIN同URL

未经允许不得转载! 作者:netkou,转载或复制请以超链接形式并注明出处旗帜大全网

原文地址:http://www.qigan1688.com/post/1493.html发布于:2024-09-06