php - CopiedTxt and CopiedTxt.execCommand doesn't work -
i have code enable me copy clipboard link of current page when click on button. seems it's no longer working. idea how update it?
<?php echo ' <script type="text/javascript"> function copytoclipboard() { copiedtxt = index.php?option=com_content&view=article&id='.$articleid.'&lang='.substr($langue, 0, -3).'&itemid='.$itemid.'; copiedtxt.execcommand("copy"); } </script> <form name="form1"> <input type="button" onclick="copytoclipboard()" value="copy link clipboard" /> </form>'; ?>
also other way copy text clipboard (using php/javascript only) welcome!
Comments
Post a Comment