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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -