CATEGORIES
>>
Dart(2)
>>
Errors(5)
>>
Android(11)
>>
Errors(1)
>>
Errors(2)
>>
Windows 8(3)
>>
iPhone7(1)
>>
Errors(4)
>>
Html(1)
RECOMMENDED SITES
Getting the current page url with Javascript
Getting the current page url with Javascript
window.location.href : It is located on which page it gives you the full link.
window.location.pathname : Getting current page pathname.
Sample :http://www.engincode.com/Makaleler/network/wireshark-giris-/35 Let us page.
var path = window.location.href;
path value http://www.engincode.com/Makaleler/network/wireshark-giris-/35 will.
var path = window.location.pathname;
path value /Makaleler/network/wireshark-giris-/35 will.
Sample If we want to get the value of 35 in the same page link
var path = window.location.pathname.split('/')[4]
path value 35 will.
Author: Engin ATALAY
Date: 10.09.2013 14:59:40
View Count: 3773
COMMENTS
No comments yet. Be the first to comment who you are.