Folgendes ist der Code. aber es funktioniert nicht. Was stimmt damit nicht? Danke.javascript --- click den Inhalt in die Zwischenablage kopieren
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>no title</title>
<script type="text/javascript">
function copyToClipBoard(content){
var clipBoardContent = '';
clipBoardContent = content;
window.clipboardData.setData("Text",clipBoardContent);
alert('have copied to the clipboard');
}
<body>
<textarea rows="4" cols="60" id="url">www.example.com</textarea>
<input type="button" value="click me" onclick="copyToClibBoard (document.getElementById ('url').value);" />
</body>
'onclick =" copyToClibBoard' sollte 'onclick =" copyToClipBoard' sein – jon3laze
Sie haben Recht. Vielen Dank. – runeveryday
hallo, dass Sie [in dieser letzten Diskussion verweisen] (http://stackoverflow.com/questions/400212/how-to-copy-to-clipboard-in-javascript) danke – melaos