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

Artillery Hornet + OctoPrint + Klipper

ย้ายบ้าน

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