JavaScript : GET variable from query string
1 2 | fullURL = parent.document.URL GetVar = fullURL.substring(fullURL.indexOf('?')+xxx, fullURL.length) |
? = variable name
xxx = length of GET variable name.
Example.
1 2 | fullURL = parent.document.URL GetVar = fullURL.substring(fullURL.indexOf('topicid')+7, fullURL.length) |
Written by Komkid on August 5th, 2009 with
no comments.
Read more articles on JavaScript and Programming.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article