Jon が質問へのコメントで提案しているように、<a>
直接スタイルを設定できます。右クリック イベントが必要な場合は、フックしoncontextmenu
てデフォルト アクションを防止します。
<a href="http://leftclicklocation.com" id="ad">Post your ad for free</a>
<script>
document.getElementById("ad").addEventListener("contextmenu",function(e) {
e.preventDefault(); // to supress the default context menu
window.location = "http://rightclicklocation.com"; // whatever you want
});
</script>
で、スタイルはこちら
#ad {
display: inline-block;
border: 1px solid black;
width: 200px;
height: 25px;
text-decoration: none;
text-align: center;
color: white; font-weight: bold;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #6db3f2; /* Old browsers */
background: -moz-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6db3f2), color-stop(50%,#54a3ee), color-stop(51%,#3690f0), color-stop(100%,#1e69de)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #6db3f2 0%,#54a3ee 50%,#3690f0 51%,#1e69de 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #6db3f2 0%,#54a3ee 50%,#3690f0 51%,#1e69de 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #6db3f2 0%,#54a3ee 50%,#3690f0 51%,#1e69de 100%); /* IE10+ */
background: linear-gradient(to bottom, #6db3f2 0%,#54a3ee 50%,#3690f0 51%,#1e69de 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6db3f2', endColorstr='#1e69de',GradientType=0 ); /* IE6-9 */
}
css3generatorとグラデーションエディタを使用しました