JS |
Wynik działania |
1. URL
<script>
document.write(location.href);
</script>
|
|
2. Protokół
<script>
document.write(location.protocol);
</script>
|
|
3. Host
<script>
document.write(location.host);
</script>
|
|
4. Host z numerem portu
<script>
document.write(location.hostname);
</script>
|
|
5. Port
<script>
document.write(location.port);
</script>
|
|
6. Pathname
<script>
document.write(location.pathname);
</script>
|
|
7. Hash
<script>
document.write(location.hash);
</script>
|
|
8. Search
<script>
document.write(location.search);
</script>
|
|