If window.location = " "
jean r
-
animostab Messages postés 2829 Date d'inscription Statut Membre Dernière intervention -
animostab Messages postés 2829 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
sur mon site qui n'est pas encore accessible, j'aimerai créer un code javascript tel que
if ()
{
window.location = "http://mosite.com/";
}
else (){
window.history.back()
}
comment faire ?
Merci
sur mon site qui n'est pas encore accessible, j'aimerai créer un code javascript tel que
if ()
{
window.location = "http://mosite.com/";
}
else (){
window.history.back()
}
comment faire ?
Merci
A voir également:
- If window.location = " "
- If exist - Forum Java
- The realtek network controller was not found. if deep sleep mode is enabled please plug the cable ✓ - Forum Pilotes (drivers)
- If char ✓ - Forum Programmation
- Php if multiple conditions ✓ - Forum PHP
- The Realtek Network Controller was not found. - Forum Pilotes (drivers)
1 réponse
Voila un code qui te met retour page précédente a toutes les pages qui ne sont pas http://monsite.com/
<script type="text/javascript">
var Goback ='<A href="javascript:history.go(-1)">Retour</A>';
if (window.location != "http://monsite.com/")
{document.getElementById('divback').innerHTML = Goback};
else
{document.getElementById('divback').innerHTML = ''}; /*attention ici c'est 2 ' et pas 1" */
</script>
<div id="divback"></div>
Un petit merci vaut mieux qu'une grande ignorance
<script type="text/javascript">
var Goback ='<A href="javascript:history.go(-1)">Retour</A>';
if (window.location != "http://monsite.com/")
{document.getElementById('divback').innerHTML = Goback};
else
{document.getElementById('divback').innerHTML = ''}; /*attention ici c'est 2 ' et pas 1" */
</script>
<div id="divback"></div>
Un petit merci vaut mieux qu'une grande ignorance