Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    errore in tempo esecuzione pagina

    ciao,

    voglio misurare il tempo di esecuzione di uno script in JScript...
    codice:
    
    var Tempo_Inizio = Timer();
    script

    codice:
    var Tempo_Fine = Timer() ;
    var Tempo_Trascorso = FormatNumber(Tempo_Fine - Tempo_Inizio, 4); 
    Response.Write ("Ricerca effettuata in " & Tempo_Trascorso & " secondi");
    ma mi da errore nella prima riga...PREVISTO OGGETTO ????

  2. #2
    Moderatore di CMS L'avatar di kalosjo
    Registrato dal
    Jul 2001
    residenza
    In culo alla luna
    Messaggi
    1,999
    Se è JScript

    codice:
    Response.Write ("Ricerca effettuata in " & Tempo_Trascorso & " secondi");
    se non mi sbaglio non accetta "&". Devi mettere "+"
    Scusate i puntini di sospensione...... La verità è che non ho argomenti....

  3. #3
    grazie....
    l'errore me lo da in:

    codice:
    var Tempo_Inizio = Timer();

  4. #4
    Utente di HTML.it L'avatar di Corwin
    Registrato dal
    Jan 2002
    Messaggi
    584
    Non esiste l'oggetto Timer in Jscript... devi fare la differenza tra due orari.
    I don't wanna have to shout it out / I don't want my hair to fall out
    I don't wanna be filled with doubt / I don't wanna be a good boy scout
    I don't wanna have to learn to count / I don't wanna have the biggest amount
    I don't wanna grow up

  5. #5
    grazie della risposta...in jscript non conosco nulla mi puoi aiutare....

  6. #6
    Utente di HTML.it L'avatar di Corwin
    Registrato dal
    Jan 2002
    Messaggi
    584
    var inizio = new Date();
    .
    . il tuo script
    .
    var fine = new Date();
    Response.Write ("Ricerca effettuata in " + ((fine.valueOf()- inizio.valueOf()) / 1000) + " secondi.");
    I don't wanna have to shout it out / I don't want my hair to fall out
    I don't wanna be filled with doubt / I don't wanna be a good boy scout
    I don't wanna have to learn to count / I don't wanna have the biggest amount
    I don't wanna grow up

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.