JavaScript : GET variable from query string


fullURL = parent.document.URL
GetVar = fullURL.substring(fullURL.indexOf('?')+xxx, fullURL.length)


? = variable name
xxx = length of GET variable name.


Example.

fullURL = parent.document.URL
GetVar = fullURL.substring(fullURL.indexOf('topicid')+7, fullURL.length)

Comments

Popular posts from this blog

ใต้ร่มกาสาวพัตร

ย้ายบ้าน

Google Gears