嗨,我有這樣的URLRegEx/Javascript:如何從URL獲取參數?
www.example.com/registration/star/xx223x/xxxx67x/xx
www.example.com/registration/star-mega/x45xx/xxxrfxx/xx
www.example.com/registration/manager/xxx34xx/xx
www.example.com/registration/pro/xxxxx/xxx
我如何使用JavaScript和正則表達式獲取參數後/註冊/和先下一/成變量? (明星,明星,經理,親)
你有沒有做過任何嘗試?你卡在哪裏?現在這看起來很像「爲我寫這篇文章」。 –
看看'location.pathname'和'Array.split'。 – A1rPun
http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript?rq=1 *** 2282 ***票和你*不能*現貨那個問題? –