Recuperer un paramètre de l'URL courante
Fermé
livemzone
-
15 févr. 2010 à 11:51
avion-f16 Messages postés 19125 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 23 mars 2023 - 15 févr. 2010 à 16:02
avion-f16 Messages postés 19125 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 23 mars 2023 - 15 févr. 2010 à 16:02
A voir également:
- Recuperer un paramètre de l'URL courante
- Comment récupérer un compte facebook piraté - Guide
- Recuperer video youtube - Guide
- Adresse url - Guide
- Impossible de récupérer mon compte gmail - Guide
- Deux caractères manquent dans cette url ✓ - Forum Programmation
2 réponses
avion-f16
Messages postés
19125
Date d'inscription
dimanche 17 février 2008
Statut
Contributeur
Dernière intervention
23 mars 2023
4 468
15 févr. 2010 à 16:02
15 févr. 2010 à 16:02
PRO_PHP
Messages postés
95
Date d'inscription
jeudi 11 février 2010
Statut
Membre
Dernière intervention
27 avril 2010
1
15 févr. 2010 à 16:01
15 févr. 2010 à 16:01
essais ca je suis pas sur....
function getVar (nomVariable)
{
var infos = location.href.substring(location.href.indexOf("?")+1, location.href.length)+"&"
if (infos.indexOf("#")!=-1)
infos = infos.substring(0,infos.indexOf("#"))+"&"
var variable=0 {
nomVariable = nomVariable + "="
var taille = nomVariable.length
if (infos.indexOf(nomVariable)!=-1)
variable = infos.substring(infos.indexOf(nomVariable)+taille,infos.length).substring(0,infos.substring(infos.indexOf(nomVariable)+taille,infos.length).indexOf("&"))
}
return variable
}
function getVar (nomVariable)
{
var infos = location.href.substring(location.href.indexOf("?")+1, location.href.length)+"&"
if (infos.indexOf("#")!=-1)
infos = infos.substring(0,infos.indexOf("#"))+"&"
var variable=0 {
nomVariable = nomVariable + "="
var taille = nomVariable.length
if (infos.indexOf(nomVariable)!=-1)
variable = infos.substring(infos.indexOf(nomVariable)+taille,infos.length).substring(0,infos.substring(infos.indexOf(nomVariable)+taille,infos.length).indexOf("&"))
}
return variable
}