ボタンは今回はfボタンのpngを使用、ボタンは好みで
javascriptで
"https://www.facebook.com/sharer.php?u=" + location.href ;
現在のページのURLを取得して該当のaタグに入れる
<div class="fshare">
<a href="" id="fslink">
<li></li>
<span class="sharetext">シェア
</a>
</a>
</div>
<style>
.sharetext {
display: inline-block;
font-family: cursive;
color: white;
}
.fshare li {
position: relative;
top: 2px;
display: inline-block;
width: 14px;
height: 14px;
background: transparent 0 0 no-repeat;
background-image: url(https://*******.jp/*******/******/flogo.png);
vertical-align: text-top;
margin-left: 3px;
}
.fshare {
width: 69px;
height: 20px;
background: #1877F2;
overflow: hidden;
display: inline-block;
border-radius: 3px;
padding-left: 4px;
padding-right: 4px;
font-size: 12px;
font-weight: bold;
}
a::visited { color:white; }
</style>
<script>
var target = document.getElementById("fslink")
target.href = "https://www.facebook.com/sharer.php?u=" + location.href ;
</script>