Can i get path from url i give in jquery? -
i want path name after request url setting.
let put http://www.abc.com
then server auto return me http://www.abc.com/sessionid/folder/default.aspx
and need return url in jquery.
got anyway this?
i try ajax get/post response header location , null value.
is reference code show @ below
$.ajax({ type: 'post', url: '/echo/html', data: {}, datatype: "json", success: function(res,status,xhr) { //var location = xhr..getresponseheader('location'); alert(xhr.getresponseheader('content-type')); alert(xhr.getresponseheader('location')); }, error: function(jqxhr) { } });
var result = 'http://www.abc.com/sessionid/folder/default.aspx', request = 'http://www.abc.com'; console.log(result.substring(request.length)); // /sessionid/folder/default.aspx
Comments
Post a Comment