Ich habe den folgenden Code:FireFox document.exeCommand (‚Kopie‘) nicht funktioniert
var doc = window.document;
var copyFrom = doc.createElement("textarea");
copyFrom.textContent = str;
var body = document.getElementsByTagName('body')[0];
body.appendChild(copyFrom);
copyFrom.select();
document.execCommand('copy');
body.removeChild(copyFrom);
Dies scheint auf Chrome zu funktionieren, wie ich in der Lage bin, den Inhalt meines ‚str‘ Variable einzufügen. Bei FireFox/Safari scheint dies jedoch nicht zu funktionieren.
Haben Sie versucht, Ihr Firefox zu aktualisieren? – Fil