ужас.
ну на тебе jQuery
<a id=1 href=http://google.ru>Google</a>
<script src="http://yandex.st/jquery/1.5.2/jquery.min.js"></script>
<script>
var href = $("a#1").*!*attr('href')*/!*;
alert( href+'\n\n А теперь нажмите на ссылку' )
$("a").click(function(){ 
alert('Не переходим!');
 *!*return false;*/!*
 })
</script>