<a id=1 href=http://google.ru>Google</a> <script> var href = document.getElementById('1').href alert( href ) location.href = href </script>