DavebyDay
  • News
  • Categorie
    • Dev
    • Download
    • Entertainment
    • Fix
    • Gaming
    • Hardware
    • Internet
    • News
    • Recensioni
    • Smart Tech
    • Software
    • Stampa 3D
    • Tutorial
    • Web
  • More
    Create Offline Videos with AI

    Create Offline Videos with AI

    How to update Open WebUI in Docker

    How to update Open WebUI in Docker

    Disable Web Search in Start Menu – Windows 10

    Disable Web Search in Start Menu – Windows 10

    Google Sheets find and replace with macro

    Google Sheets find and replace with macro

    Dead Pixel Test for Widescreen 21:9 – 4K

    Dead Pixel Test for Widescreen 21:9 – 4K

    Come esportare i modelli 3D di Fortnite

    Creare un Pattern con un’ immagine in Photoshop

    Installare CentOS 6.9 su una Virtual machine VMware

    Guida Rapida per utilizzo Xiaomi Yi

  • Video
  • Contatti
No Result
View All Result
  • News
  • Categorie
    • Dev
    • Download
    • Entertainment
    • Fix
    • Gaming
    • Hardware
    • Internet
    • News
    • Recensioni
    • Smart Tech
    • Software
    • Stampa 3D
    • Tutorial
    • Web
  • More
    Create Offline Videos with AI

    Create Offline Videos with AI

    How to update Open WebUI in Docker

    How to update Open WebUI in Docker

    Disable Web Search in Start Menu – Windows 10

    Disable Web Search in Start Menu – Windows 10

    Google Sheets find and replace with macro

    Google Sheets find and replace with macro

    Dead Pixel Test for Widescreen 21:9 – 4K

    Dead Pixel Test for Widescreen 21:9 – 4K

    Come esportare i modelli 3D di Fortnite

    Creare un Pattern con un’ immagine in Photoshop

    Installare CentOS 6.9 su una Virtual machine VMware

    Guida Rapida per utilizzo Xiaomi Yi

  • Video
  • Contatti
No Result
View All Result
DavebyDay
No Result
View All Result
Home Internet

Cambiare un determianto testo ad ogni page reload

Davebyday by Davebyday
Ottobre 15, 2020
in Internet, Software, Tutorial, Web
0
8
SHARES
111
VIEWS
Share on FacebookShare on Twitter

Vediamo spesso su molti siti parti che cambiano dinamicamente il testo in una determinata zona ogni volta che andiamo a caricare la pagina. Questo metodo è molto utilizzato nella parte dei testimonial o dei feedback ricevuti. Ma come si può impostare questo testo dinamico?
Per impostare un testo, in un determinato punto del nostro sito, che cambi ogni volta che viene visualizzata la pagina è possibile utilizzare qualche riga di javascript.
Nello specifico come segue:

<script>

function text() {
};
text = new text();
number = 0;
// textArray
text[number++] = "Random text string 1."
text[number++] = "Random text string 2."
text[number++] = "Random text string 3."
text[number++] = "Random text string 4."
text[number++] = "Random text string 5."
// keep adding items here...
increment = Math.floor(Math.random() * number);
document.write(text[increment]);
//-->

</script>

Salviamo il contenuto all’interno del nostro file interessato ed ora vedremo i vari “Random text string” comparire diversi a ogni reload!

Create Offline Videos with AI

AI Startup System Prompts Leaked

Run .BAT Files in Minimized Mode

Absolute Zero – Self-Improvement AI

How to update Open WebUI in Docker

Post Views: 391
Tags: htmljavascriptjsphp
Share3Tweet2SendShareShare
Previous Post

Visualizzare la Favicon di un sito con Google

Next Post

htaccess per sfruttare la memorizzazione nella cache del browser

Related Posts

Create Offline Videos with AI
AI

Create Offline Videos with AI

by Davebyday
Maggio 21, 2025
8
AI Startup System Prompts Leaked
AI

AI Startup System Prompts Leaked

by Davebyday
Maggio 19, 2025
22
Run .BAT Files in Minimized Mode
Dev

Run .BAT Files in Minimized Mode

by Davebyday
Maggio 10, 2025
36
Absolute Zero – Self-Improvement AI
AI

Absolute Zero – Self-Improvement AI

by Davebyday
Maggio 19, 2025
14
How to update Open WebUI in Docker
AI

How to update Open WebUI in Docker

by Davebyday
Aprile 7, 2025
496
Next Post

htaccess per sfruttare la memorizzazione nella cache del browser

Encode e Decode dei nostri progetti in Base64

Recommended Stories

Create Offline Videos with AI

Create Offline Videos with AI

Maggio 21, 2025
8
AI Startup System Prompts Leaked

AI Startup System Prompts Leaked

Maggio 19, 2025
22
Run .BAT Files in Minimized Mode

Run .BAT Files in Minimized Mode

Maggio 10, 2025
36
Absolute Zero – Self-Improvement AI

Absolute Zero – Self-Improvement AI

Maggio 19, 2025
14
What is Model Context Protocol

What is Model Context Protocol

Maggio 19, 2025
13
How to update Open WebUI in Docker

How to update Open WebUI in Docker

Aprile 7, 2025
496
  • Configurare Raspberry Pi come Access Point Bridge

    223 shares
    Share 89 Tweet 56
  • Trovare file con percorso più lungo di 255 caratteri

    202 shares
    Share 81 Tweet 51
  • Raspberry Pi: come avviare programmi allo start up

    178 shares
    Share 71 Tweet 45
  • Mega.co.nz non si apre

    174 shares
    Share 70 Tweet 44
  • Come abilitare il login per l’utente root nella GUI Debian

    151 shares
    Share 60 Tweet 38
  • Home Assistance Compatible Device
  • My Setup
  • News
  • Web Tech & DIY

© 2020

No Result
View All Result
  • Home Assistance Compatible Device
  • My Setup
  • News
  • Web Tech & DIY

© 2020