Leaks-Community
Veuillez vous connecter pour continuer.

Rejoignez le forum, c’est rapide et facile

Leaks-Community
Veuillez vous connecter pour continuer.
Leaks-Community
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Qui est en ligne ?
Il y a en tout 1 utilisateur en ligne :: 0 Enregistré, 0 Invisible et 1 Invité

Aucun

Voir toute la liste

Les posteurs les plus actifs de la semaine
10 Messages - 71%
3 Messages - 21%
1 Message - 7%
Statistiques
Nous avons 2968 membres enregistrésL'utilisateur enregistré le plus récent est SheyzohNos membres ont posté un total de 3137 messagesdans 909 sujets
Le Deal du moment : -28%
Brandt LVE127J – Lave-vaisselle encastrable 12 ...
Voir le deal
279.99 €

Aller en bas
avatar
hacxx
Messages : 715
Points : 1774
Date d'inscription : 21/01/2024

Save for Download Page Generator by Privateloader 2 Script Empty Save for Download Page Generator by Privateloader 2 Script

Mar 23 Avr - 17:39
Code:

function saveTextAsFile() {
  var title = document.getElementById('title').value;
  if (title == "") {alert('Type your title!'); return false;}
  
  // Get the textarea element by its ID
  var textarea = document.getElementById('output');

  // Get the text from the textarea
  var textToSave = textarea.value;

  // Create a new Blob object with the text content
  var blob = new Blob([textToSave], { type: 'text/plain' });

  // Create a temporary <a> element
  var link = document.createElement('a');

  // Set the href attribute of the <a> element to the URL of the blob
  link.href = URL.createObjectURL(blob);

  // Set the download attribute to specify the default file name
  link.download = ''+title+'.html';

  // Programmatically click the link to trigger the download
  link.click();
}
Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum