Dav*_*801 4 html javascript php
我正在尝试为我的简单网站添加分享按钮...
是否有可能在纯HTML中制作Facebook"喜欢"按钮?
是否有可能在纯HTML中制作Twitter"喜欢"按钮?
从Facebook的开发人员文档中,将以下内容插入到标记的正文中:
<iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
Run Code Online (Sandbox Code Playgroud)
(确保关闭iframe标签,在Facebook网站上保持打开状态.)
对于twitter(在论坛上找到):
<a href="https://twitter.com/home?status=Enter status message here"
title="Click to send this page to Twitter!" target="_blank">Tweet This!</a>
Run Code Online (Sandbox Code Playgroud)
该资料Tweet按钮是Twitter上推荐的方法,虽然这样一个简单的链接的作品也一样,如果你想分享的链接:
类似,也http://www.facebook.com/sharer.php?u=允许共享URL.
可能有更多的方法可以在不使用JavaScript的情况下进行共享(我记得在twitter主页上预设推文文本的一些功能,但现在无法找到它).