js copy to clipboard

fonction de copie avec prompt

by toubia95

JavaScript

function copyToClipboard (text) {
  window.prompt ("Copy to clipboard: Ctrl+C, Enter", text);
}

copyToClipboard ("texte Ă  copier par l'utilisateur");