ho trovato la soluzione la posto per tutti in questo codice che funziona :
codice:
<html>
<head>
<title>Here is some text you can copy. You can copy text from anywhere on the page, simply select it and press the Copy to clipboard b</title>
<meta name="generator" content="prova">
<script type="text/javascript">
function CopyToClipboard()
{
document.Form1.txtArea.focus();
document.Form1.txtArea.select();
CopiedTxt = document.selection.createRange();
CopiedTxt.execCommand("Copy");
}
</script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<form name="Form1">
Here is some text you can copy. You can copy text from anywhere on the page, simply select it and press the Copy to clipboard button. Then you can paste it anywhere you want, in Notepad, Visual Studio or in the textarea below.
<textarea id="txtArea" cols="60" rows="5">testo prova che si evidenzia e va in memoria You can also copy text from this textarea.
spazi
Or you can paste the text here, using the Ctrl+V key
spazi a capo
[img][/img]
va a capo
combination.</textarea>
<input type="button" onClick="CopyToClipboard()" value="Copy to clipboard" />
</form>
</p>
</body>
</html>