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 disable model timestamps in Laravel 5.3?
- Laravel 5 - "syntax error or access violation 1055 in group by" Solved
- How to fetch this week records in MySql ?
- Automatically Refresh or Reload a Page using jQuery Example
- Fadein Fadeout example in Jquery
- Laravel 5 - generate PDF from html view file and download using dompdf
- How to get days difference between two dates in laravel?
- Bootstrap Color Picker Example using mjolnic colorpicker plugin