getting parts of url window.location

Posted by ilkin on Stack Overflow See other posts from Stack Overflow or by ilkin
Published on 2010-03-29T14:34:39Z Indexed on 2010/03/29 14:43 UTC
Read the original article Hit count: 279

Filed under:
|
|

Can someone help me with url hash? I use this code to get the current url and then send the data as json, but the hash part seems to be stripped then. i tryed to use href and hash and i always get the default.aspx but no hash part like #anchor.

var location = String(window.location);
var title = String(document.title);
var text = { 'url': location, 'title': title };

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript