1

For example, I have this URL:

http://www.shafadoc.ir/#!mykey=ali

how can get the value of mykey?

porya ras
  • 458
  • 5
  • 15

1 Answers1

0

If you only have one parameter you can do that:

var param = location.search.split('mykey=')[1]

EDIT:

This is probably better:

var param = window.location.hash.substr(1);
Mokkun
  • 708
  • 4
  • 14