百度分享按钮在项目中的使用,百度分享按钮项目
在项目中用到了百度分享按钮,主要实现代码如下:
<script><br />window._bd_share_config={<br /> "common":{<br /> "bdText" : '分享有好礼相赠!', <br /> "bdDesc" : '', <br /> "bdUrl" : 'http://www.baidu.com',#此处写分享地址<br /> "bdSign": 'off'<br /> },<br /> "image":{<br /> "viewList":["qzone","tsina","tqq","renren","weixin"],<br /> "viewText":"分享到:",<br /> "viewSize":"16"<br /> }<br />};<br /> <br />with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];<br /></script>
百度分享按钮的全部参数及用法:
<script><br /> window._bd_share_config = {<br /> common : {//此处是通用设置<br /> bdText : '自定义分享内容', <br /> bdDesc : '自定义分享摘要', <br /> bdUrl : '自定义分享url地址', <br /> bdPic : '自定义分享图片'<br /> },<br /> share : [{#此处是放置分享按钮的设置<br /> "bdSize" : 16<br /> }],<br /> slide : [{#此处放置悬浮窗分享设置 <br /> bdImg : 0,<br /> bdPos : "right",<br /> bdTop : 100<br /> }],<br /> image : [{#此处放置图片分享设置<br /> viewType : 'list',<br /> viewPos : 'top',<br /> viewColor : 'black',<br /> viewSize : '16',<br /> viewList : ['qzone','tsina','huaban','tqq','renren']<br /> }],<br /> selectShare : [{#此处放置划词分享设置<br /> "bdselectMiniList" : ['qzone','tqq','kaixin001','bdxc','tqf']<br /> }]<br /> }<br />#js加载部分,这部分的代码是固定的,不能随意更改。<br /> with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];<br /></script>
具体详解见:http://share.baidu.com/code/advance 里面有详细教程

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool