The current URL in jQuery can be obtained by using the ‘href’ property of the Location object which contains information about the current URL. The ‘href’ property returns a string with the full URL of the current page.
Before clicking the button:
After clicking the button:
- How to get title of current HTML page using jQuery ?
- How to get the size of screen, current web page and browser window using jQuery?
- How to get current function name in PHP?
- How to get current year in PHP ?
- PHP | current() Function
- PHP | ArrayIterator current() Function
- PHP | SplFileObject current( ) Function
- PHP | SimpleXMLIterator current() Function
- PHP | DirectoryIterator current() Function
- PHP | FilesystemIterator current() Function
- How to get the current weeknumber of the year?
- PHP | AppendIterator current() Function
- PHP | CachingIterator current() Function
- PHP | SplDoublyLinkedList current() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.