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 check empty or null in Mysql Query?
- Laravel 5 - Column sorting with pagination example from scratch
- PHP - How to implement Google new reCAPTCHA Code Example with Demo?
- How to send mail using Sendgrid in laravel 5?
- How to Check if Element is Exists or not in jQuery?
- How to get ckeditor value with tags on ajax-submit ?
- How to get filename from path in PHP?
- Sql function remove numeric characters from column example