在您的網站的 head 標記內添加以下代碼:
<script> function SocialShare(url) { window.open('https://community.hot166.com/share?url=' + url, '', 'height=600,width=800'); } </script>
然後在將要共用的 URL 更改為頁面 HTML 後放置共用按鈕:
<button onclick="SocialShare('http://yoursite.com/')">Share</button>
Also you can use this code to share the current page:
<button onclick="SocialShare(window.location.href)">Share</button>