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

เพิ่ม Font ภาษาไทยให้ OpenElec (Kodi)

Axapta : Query Properties