Get the Current Website URL in JavaScript

You can get the current URL of the website using the JavaScript.There is inbuilt function to get the URL in page.The following example give you the demo.