Miu*_*nga 6 google-plus-one google-plus
Google+图标会自动在HOVER上共享页面,而不需要像其他人一样点击.有没有什么可以做到这一点,要求点击像其他人[fb,推特],并加载弹出窗口,如Twitter共享图标?
JavaScript window.open方法将打开一个新窗口.您可以将此技术与共享链接结合使用以实现目标.这是从官方文档中提取的这种技术的一个例子.只需替换目标网址即可http://example.com.
<a href="https://plus.google.com/share?url=http://example.com"
onclick="javascript:window.open('http://example.com','',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');
return false;">
<img src="https://www.gstatic.com/images/icons/gplus-64.png"
alt="Share on Google+"/>
</a>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5959 次 |
| 最近记录: |