打开APP
未登录
开通VIP,畅享免费电子书等14项超值服
开通VIP
首页
好书
留言交流
下载APP
联系客服
网页一键分享按钮HTML代码
aaie_
>《HTML+CSS+JS》
2017.01.24
关注
在网页中加入以下代码可以实现网页的一键分享:
[html]
view plain
copy
<!DOCTYPE html
>
<
html
>
<
head
>
<
META
http-equiv
=
"content-type"
content
="text/html; charset="
UTF
-8"
>
<
title
>
Insert title here
</
title
>
</
head
>
<
body
>
<
div
class
=
"bdsharebuttonbox"
>
<
a
href
=
"#"
class
=
"bds_more"
data-cmd
=
"more"
>
</
a
>
<
a
href
=
"#"
class
=
"bds_qzone"
data-cmd
=
"qzone"
title
=
"分享到QQ空间"
>
</
a
>
<
a
href
=
"#"
class
=
"bds_tsina"
data-cmd
=
"tsina"
title
=
"分享到新浪微博"
>
</
a
>
<
a
href
=
"#"
class
=
"bds_tqq"
data-cmd
=
"tqq"
title
=
"分享到腾讯微博"
>
</
a
>
<
a
href
=
"#"
class
=
"bds_renren"
data-cmd
=
"renren"
title
=
"分享到人人网"
>
</
a
>
<
a
href
=
"#"
class
=
"bds_weixin"
data-cmd
=
"weixin"
title
=
"分享到微信"
>
</
a
>
</
div
>
<
script
>
window._bd_share_config
={
"common":{
"bdPopTitle":"您的自定义pop窗口标题",
"bdSnsKey":{},
"bdText":"此处填写自定义的分享内容",
"bdMini":"2",
"bdMiniList":false,
"bdPic":"http://localhost/centlight/public/attachment/201410/24/14/5449ef39574f5_282x220.jpg", /* 此处填写要分享图片地址 */
"bdStyle":"0",
"bdSize":"16"
},
"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
>
</
body
>
</
html
>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报
。
打开APP,阅读全文并永久保存
查看更多类似文章
猜你喜欢
类似文章
【热】
打开小程序,算一算2024你的财运
【网页特效】添加收藏 - 将网页添加到浏览器收藏夹里
百度分享新浪微博无法分享图片的解决方法
代码学习笔记33【页内插入样式应用】
小白搞爬虫
点开网页自动关机的代码
音画制作方法与步骤 - 悠悠红河的日志 - 网易博客
更多类似文章 >>
生活服务
热点新闻
留言交流
回顶部
联系我们
分享
收藏
点击这里,查看已保存的文章
导长图
关注
一键复制
下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!
联系客服
微信登录中...
请勿关闭此页面
先别划走!
送你5元优惠券,购买VIP限时立减!
5
元
优惠券
优惠券还有
10:00
过期
马上使用
×