mardi 4 août 2015

Give a specific value to a variable based on url content

I have a site with a core domain with something like this:

www.example.com/de-e
www.example.com/us-e

If I start the navigation to site and go to different pages I have urls like this:

http://ift.tt/1P3HdMx

I want to store give to a variable named vde the value de if the url have the value de-e and us if the url have the value us-e.With JQuery I could possible use the contains() with simple JS how can I make it?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire