Share this post:
In this post i give you three way to get current url in your js file as there are bellow listed:
Ok, so you can check bellow example code and run in your system.
<title>JQuery - get current URL Example</title>
var currentURL = window.location.href;
var currentURL = $(location).attr("href");
var currentURL = window.location;
- How to add charts in Laravel 5 using Chart JS ?
- PHP - How to Convert file(image, audio, video) extension using CloudConvert API?
- How to check table is exists or not in Laravel 5?
- How to get Lat and Lon from google map API in Jquery PHP?
- Laravel 5 - Full Text Search Example using Scout and Algolia Packages
- Order by using multiple columns and manually array field in Laravel?
- How to get months difference between two dates in laravel?