Ir para conteúdo
Fórum Script Brasil

xamonix

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Posts postados por xamonix

  1. Olá amigos tenho este código em java que me redirecciona a pagina consoante a linguagem do browser seja ou não portuguesa. O redireccionamento é instantaneo mas eu queria atrasá-lo uns 2 ou 3 segundos. Como faço? Escusado será dizer que sou um ignorante nestas coisa de programção , o código foi sacado doutro site (mas ainda sei fazer copy/paste...lol). Obrigado pela ajuda!

    <script LANGUAGE="JavaScript1.2">
    <!-- Begin
    if (navigator.appName == 'Netscape')
    var language = navigator.language;
    else
    var language = navigator.browserLanguage;
    
    /*-------------------------------------------------------------
    Netscape instructions:
    In Netscape, find the language you want to redirect by going to
    
    Edit Menu --> Preferences...
    
    Then click the '+' box next to 'Navigator' and click 'Languages'
    Click 'Add' then find the languages you want and add them below.
    
    ---------------------------------------------------------------
    
    Microsoft Internet Explorer instructions:
    In MSIE, find the language you want to redirect by going to
    
    Tools Menu --> Internet Options...
    
    Then click the 'Languages' button near the bottom of the page.
    Click 'Add' then find the languages you want and add them below.
    
    -------------------------------------------------------------*/
    if (language.indexOf('en') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('nl') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('fr') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('de') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('já') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('it') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('pt') > -1) document.location.href = 'portugues.htm';
    else if (language.indexOf('es') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('sv') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('zh') > -1) document.location.href = 'english.htm';
    else if (language.indexOf('ru') > -1) document.location.href = 'english.htm';
    else
    document.location.href = 'portugues.htm';
    // End -->
    </script>
    

×
×
  • Criar Novo...