PHP Select-Ergebnis in die Zwischenablage kopieren?

Ist es möglich ein angezeigtes Ergebnis aus PHP mit einem Symbol-Klick, (das heisst KEIN Button) wie z.B. style="text-decoration:none;">↻ in die Zwischenablage zu kopieren? Mit Ajax scheint das ja anscheinend zu laufen - nur habe ich absolut keine Ahnung von Java-Script. Kann mir vielleicht jemand helfen? Danke.

Der hier verwendete Code

<script src="/js_webseite/jquery.js"></script> <style> input{  position:absolute;  top:-1000px; } </style> <p>Dieser Text kommt von php. Klick mich an</p> <div class="tool"></div> <script> $('p').click(function(e){ input=document.createElement('input'); input.type='text'; input.id="phantomselect"; document.getElementsByTagName('body')[0].appendChild(input); input.value=$(this).html() input.focus(); input.select(); if (document.getSelection){ txt = document.getSelection(); toolaus(txt); }else if (document.selection){ txt = document.selection.createRange().text; toolaus(txt); }else{} function toolaus(txt){ $('.tool').html('Der Text wurde in der zwischenablage Kopiert<br><p style="color:red;text-align:center;">'+txt+'</p>'); document.execCommand("copy"); $(".tool").fadeIn("fast"); function close(){ $(".tool").fadeOut("fast"); } setTimeout(function(){close()},2000); } }); </script>