Q:

jquery get url

var currentURL = $(location).attr('href'); //jQuery solution
var currentURL = window.location.href; // raw javascript
4
var currentURL = $(location).attr('href'); 
var currentURL = window.location.href;
1
$.get( "ajax/test.html", function( data ) {
  $( ".result" ).html( data );
  alert( "Load was performed." );
});
5
var pathname = window.location.pathname;
0
console.log(window.location.origin);
0

New to Communities?

Join the community