Wednesday, July 23, 2014

Alert the hostname of the current URL using javascript

<script>
function myFunction() {
    alert(location.hostname);
}
</script>

No comments:

Post a Comment