简体   繁体   English

document.execCommand()方法不适用于Iphone中的safari

[英]The document.execCommand() method is not working on safari in Iphone

I'm doing copy text when click on the button to copy the text from the text field. 我在单击按钮时复制文本,从文本字段中复制文本。 But not working on safari in Iphone This is my function 但是没有在Iphone上进行safari这是我的功能

function myFunction() {
      var copyText = document.getElementById("myInput");
      copyText.select();
      document.execCommand("copy");
     }

Copy command works from iOS 10. I think you may not have the supported version. 复制命令适用于iOS 10.我认为您可能没有受支持的版本。 See here for browsers/iOS support Reference 请参阅此处了解浏览器/ iOS支持参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM