new Clipboard('#copy', { container: document.getElementById('.product-modal') });
然而,我在模式窗口中有2个输入。第一个正在加载时选择。当我需要复制第二个文本时,我需要手动选择文本并单击复制。如何解决这个问题,使点击复制按钮时文本自动复制到正确的输入?
任何人
已排序:
jQuery(document).ready(function () { new Clipboard('#copy', { target: function(trigger) { return trigger.previousElementSibling; } }); });