复制订单号

订单号:

复制


function copyArticle() {

  var text =document.getElementById("ding").innerText;

  var input = document.createElement('input');

  input.setAttribute('id', 'copyInput');

  input.setAttribute('value', text);

  document.getElementsByTagName('body')[0].appendChild(input);

  document.getElementById('copyInput').select();

  if (document.execCommand('copy')) {

    mui.toast("复制成功!");

  }

  document.getElementById('copyInput').remove();

}

你可能感兴趣的:(复制订单号)