1.

Solve : Putting URL on page?

Answer»

Anyone know if it's possible to automatically put the current URL into the page. Say I want a LANDING page with the domain on it, but don't want to handcraft each page for each domain.

Thanks in ADVANCE
Code: [Select]<script type="text/javascript">
  document.write("<a href='" + document.location.href + "'>This page</a>");
</script>
Haven't tested that but it should work. document.location.href HOLDS the current URL anyway. Try typing "javascript:ALERT(document.location.href)" into your BROWSER.



Discussion

No Comment Found