クリップボードにモバイルクリックのコピーを終了

$(」コピー')(関数(){]をクリックします。
  VAR文= $(この).prev()、子供()テキスト()。。
  constの入力=のdocument.createElement('入力');
  input.setAttribute('読み取り専用」、 '読み取り専用');
  input.setAttribute( '値'、テキスト);
  document.body.appendChild(入力)、
  (0、9999)input.setSelectionRange;
  IF(document.execCommand( 'コピー')){
    入力.select()
    document.execCommand( 'コピー');
  }
  document.body.removeChild(入力)
  。$( 'clipBoard_notice ')、CSS('表示'、 'ブロック')
  てclearTimeout(this.delay)
  this.delay =のsetTimeout(関数(){
    $( 'clipBoard_notice ')。CSS('表示'、 'なし')
  }、2000)
})

おすすめ

転載: www.cnblogs.com/luoshida/p/12071867.html