Home  >  Article  >  Web Front-end  >  Pure JS code realizes one-click sharing function_javascript skills

Pure JS code realizes one-click sharing function_javascript skills

WBOY
WBOYOriginal
2016-05-16 15:04:321330browse

Without further ado, let’s get straight to the code:

The core code is as follows:

<div style="padding-left: 30px; margin-bottom: 8px; margin-top:5px; ">
<div>
<a title="分享到" href="http://www.bShare.cn/" id="bshare-shareto">分享到</a>
<a title="分享到QQ空间">QQ空间</a>
<a title="分享到新浪微博">新浪微博</a>
<a title="分享到人人网">人人网</a>
<a title="分享到腾讯微博">腾讯微博</a>
<a title="分享到豆瓣">豆瓣</a>
<a title="更多平台" class="bshare-more bshare-more-icon more-style-addthis"></a>
<span class="BSHARE_COUNT bshare-share-count">0</span>
</div>
<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#style=-1&uuid=&pophcol=2&lang=zh"></script>
<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/bshareC0.js"></script>
</div>

This is the end of the code for realizing one-click sharing function in js. The code is very simple. If you have any questions, please leave me a message. The editor will get in touch with you in time. I would also like to thank you all for your support of the Script House website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn