欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  技术分享

jQuery网站分享代码_百度分享专业开发版Demo下载

程序员文章站 2022-02-16 11:57:01
...

基于jQuery和百度分享专业开发版开发而来的一款网页点击按钮网页一键分享的Demo、百度*选择版分享本来已经是一款分享控件了、Demo只是对百度分享专业开发版做了一个深度订制的功能、具体的文档可以参考百度分享专业开发版文档、使用jQuery和Html以及Css对界面进行了订制、并且兼容各浏览器、效果图片如下

jQuery网站分享代码_百度分享专业开发版Demo下载


HTML代码

<div class="share-dialog">
<div class="share-close"></div>
<div class="share-dialog-title">分享</div>
<div class="share-dialog-cont">
    <div class="share-copy">
        <div class="share-copy-l">分享链接:</div>
        <div class="share-copy-c"><input id="copytext" type="text"></div>
        <div id="btnCopy" class="share-copy-r"  data-clipboard-target="copytext">复制链接</div>
        <div class="clear"></div>
    </div>
    <div class="share-platform">
        <div class="share-platform-l">社交平台:</div>
        <div class="share-platform-r">
            <div class="bdsharebuttonbox">
                <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
                <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
                <a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
                <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
            </div>
            <div class="share-platform-text">
                您可以直接复制短链,分享给朋友,也可直接点击社交平台图标,指定分享。
            </div>
        </div>
    </div>
</div>
</div>


百度分享代码和jQuery代码

<script>
    window._bd_share_config={
            "common":{"bdSnsKey":{},
            "bdText":"分享到新浪微博",
            "bdMini":"1",
            "bdMiniList":[
                "bdxc","tqf","douban","bdhome","sqq","thx","ibaidu",
                "meilishuo","mogujie","diandian","huaban","duitang",
                "hx","fx","youdao","sdo","qingbiji","people","xinhua",
                "mail","isohu","yaolan","wealink","ty","iguba","fbook",
                "twi","linkedin","h163","evernotecn","copy","print"],
            "bdPic":"",
            "bdStyle":"1",
            "bdSize":"32"
        },
        "share":{}
    };
    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)];
</script>
<script src="jquery-1.11.1.min.js"></script>
<script src="ZeroClipboard.js"></script>
<script>
    var g_url = window.location.href;
    $(´.share-copy-c input´).val(g_url);
    var clip = new ZeroClipboard( document.getElementById("btnCopy"));
</script>


jQuery网页分享源代码下载链接: 点击下载jQuery网页分享源码 密码: bv6v