Skip to content

Instantly share code, notes, and snippets.

@Huluvu424242
Created May 24, 2015 16:10
Show Gist options
  • Save Huluvu424242/ebde1e4fdb7fe4a4056d to your computer and use it in GitHub Desktop.
Save Huluvu424242/ebde1e4fdb7fe4a4056d to your computer and use it in GitHub Desktop.
Ermittle Link Header aus aktueller Seite
<html>
<head>
<link id="link1" rel="search" href="http://www.google.de">
<script type='text/javascript'>
function showLinklist() {
alert('Gleich');
alert(document.getElementById("link1").href);
//alert(document.head.link['link1'].href);
}
</script>
</head>
<body>
<h1>Testseite</h1>
<button onclick="showLinklist()">Try it</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment