О, заработало:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
function reply_guild(e)
{
e.preventDefault()
if(this.type) alert('Принять')
else alert('Отказаться')
}
function main()
{
document.querySelector('#accept').addEventListener('click', {handleEvent: reply_guild, type: true})
document.querySelector('#skip').addEventListener('click', {handleEvent: reply_guild, type: false})
}
document.addEventListener('DOMContentLoaded', main)
</script>
</head>
<body>
<center>
<a id="accept" href="/bla-bla.php?action=accept&sign=40f45705adc40e6d9510addd79473bd0">Принять</a>
<br>
<a id="skip" href="/bla-bla.php?action=skip&sign=40f45705adc40e6d9510addd79473bd0">Отказаться</a>
</center>
</body>
</html>