1
我有以下文字我如何获得价值与JavaScript正则表达式
http://www.mydomain.com/#!/account/?id=17
和我得到#与window.location.href这是给我
#!/account/?id=17
现在我想提取该值与preg_match或任何正则表达式,因为该ID值是动态的... ... 实际上,我正在加载数据与jquery ajax ...请让我知道得到的值的确切表达式...
但如何可以匹配帐户/?ID = 17作为一个整体 – 2010-09-17 17:10:47
“#!/帐户/?ID = 17” .match (/#\ !(.*)/)[1] – 2010-09-17 17:15:14
“#!/ account /?id = 17”.match(/#\!\ /(。*)/)[1] – Topera 2010-09-17 17:35:38