0

这是CSS代码:

<style>
.fa-google {
  background: #dd4b39;
  color: white;
}
.fa {
  padding: 20px;
  font-size: 30px;
  width: 30px;
  text-align: center;
  text-decoration: none;
  margin: 5px 2px;
  border-radius: 50%;
}
</style>

这是用于捕获当前 url 并显示它的按钮和 JavaScript:

<a class="fa fa-google" href="javascript:fbCurrentPage()" target="_blank" alt="share this page"></a>
    <script>
    var url = window.location.href; //Captures the current url


    function fbCurrentPage() {
        window.open('https://plus.google.com/share'+escape(window.location.href)+'&text='+document.title + ' via : ' + url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');
        return false; 
    }
    </script>

这是来自谷歌的错误:

在此处输入图像描述

4

0 回答 0